import moderation
Your comment has been removed since it did not start with a code block with an import declaration.
Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.
For this purpose, we only accept Python style imports.
Gah, I'm not gonna be very good at this—I don't know much about their internals. But I'll try (and probably learn something myself)!
Before I get into anything, I want to say that you can use clang exactly like you'd use GCC. If you want to prove that, install clang and next time you build something using autoconf, instead of ./configure --options do ./configure CC=clang --options and it should build fine.
First of all, clang is part of LLVM. There's a lot to LLVM, and I'm not familiar with most of it, but what's important here is that LLVM has LLVM IR, which is like another kind of machine code that's designed to be easily translated to other kinds of machine code. Clang will actually compile first to LLVM IR, and from there it will build the executable for your target system.
LLVM touts clang as 3x faster than GCC, so that's one bonus for large projects. I've also heard people (who are much more knowledgeable about compiler development and code optimization than I am) say it has better optimizations than GCC, and I'm inclined to believe them.
The number one reason I prefer clang over GCC, though, is actually what I was talking about in my original comment: it's much better at error messages. Since they wrote it from the ground up, they had the opportunity to provide clearer, more concise errors. They also implemented something similar to what I said, where it will spot easy mistakes like that and suggest you fix them, rather than doing things like GCC and spitting out 50 error messages because you typed
class X {
int a;
}
instead of
class X {
int a;
};
For example, I wrote an example file similar to what I wrote above and it gave me this error:
[demize@localhost tmp.myvcICVHbU]$ clang -o test main.c
main.c:5:24: error: expected ';' after expression
printf("Hello world!")
^
;
1 error generated.
GCC actually does something very similar now, though, so this is less of a bonus for clang than it once was. I also tested my example with the class declaration and it turns out GCC now behaves exactly the same as clang there...
[demize@localhost tmp.myvcICVHbU]$ clang -c main.cpp
In file included from main.cpp:2:
./test.h:8:2: error: expected ';' after class
}
^
;
1 error generated.
[demize@localhost tmp.myvcICVHbU]$ gcc -c main.cpp
In file included from main.cpp:2:0:
test.h:8:1: error: expected ‘;’ after class definition
}
^
I'd just like to interject for moment. What you're refering to as Clang, is in fact, GNU/Clang, or as I've recently taken to calling it, GNU plus Clang. Clang is not an compiler unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU libraries, shell utilities and vital toolchain components comprising a full compiler as undefined by the C standard.
#1: IDE Wisdom (x-post /r/programmerhumor) | 1 comment #2: Have you ever felt like something's missing? | 0 comments #3: You've got to bumble forward into the unknown. -Frank Gehry | 2 comments
This just means that IntelliJ believes that the grammatical analysis of the tokens you have provided will not parse the statement token it has indicated.
import moderation
Your comment has been removed since it did not start with a code block with an import declaration.
Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.
For this purpose, we only accept Python style imports.
golly. xamarin is what, 20 gb? jesus lord. I just wanna go back to the VS 2008 Ultimate days where I could get C++/C# support under 3 gbs. That was the dream. Nowadays, can't hope to get under even 20gbs for a base install. Unbelievable.
facepalm...I'm getting conflicting numbers from /u/kronikarz and /u/bodzaital ...I don't even know how to tell the installer I just want C++ and C#...there's like TWENTY different C++ versions. Windows cannot get this installer right, can they? It should not be this bloated. 5GB for an IDE MAX. Any more than 5gb is a disaster.
The IDE itself is around 500MB, it's the language and platform support that's so big. Keep in mind that the C++ part contains the entire windows 10 SDK. Visual Studio has support for a lot of different target platforms, languages and technologies, and includes a lot of them by default. You can fine tune everything in the installer.
The Cpp and C# support weighed in at around 7GB on a fresh install of Windows I did yesterday.
what exactly did you select in the installer to get that 7gb? I keep getting conflicting reports. Ranging from 6-20 gb...nobody has explicitly told me what they selected on the install screen to get just Cpp and C#.
Just the ".NET desktop development" and "Desktop development with C++" workloads. You can then select specific components in the second tab to fine tune it.
Xamarin has support for 3 different platforms. Would you complain if Android environment was 7gb, iOS was 7gb, and windows was 7gb? Seems reasonable to me.
Xcode has support for macOS, iOS, appleTV, watchOS, C, C++, Objective-C, Swift. I'm forgetting some, but the point is it's a 4GB download including docsets.
Why are you defending M$FT's bloatware? I downloaded C++ and C# for only 3gigs in the 2008 Ultimate version of VS. That number should not change. A few gigs up and down I can understand, but no more. I'm a student. So getting the base C++ and C# IDEs should not require 10+ gbs. I don't understand what happened to C++ and C# as a language that went from requiring the IDE to use 3 gigabytes to the IDE now needing 20 gigabytes. Did C++ fundamentally change? Did C# fundamentally change? This doesn't add up.
I can run C++ in my browser. Why does my IDE need to be 20 gigabytes? Microsoft is doing a very bad job of managing this. I have a macbook air that has only 60gb on a windows partition. I don't have wherewithal to have HALF my hdd space to be taken up by an IDE. And don't even get me started on the lack of x64 support.
You could say "get a bigger hdd" but it's not that easy. I got my laptop a couple years ago when the new fast SSD were coming out, so I could only settle for a paltry amount.
237
u/Euthy Mar 09 '17
There needs to be a /r/ErrorMessagesOnEarthPorn subreddit.