Forgot your password?
typodupeerror
This discussion has been archived. No new comments can be posted.

LLVM Clang Compiler Now C++11 Feature Complete

Comments Filter:
  • Thank you, Apple! (Score:5, Insightful)

    by Anonymous Coward on Saturday April 20, 2013 @09:28AM (#43503421)

    Regardless of what you may personally think about Apple, they have made some very valuable contributions to LLVM and Clang. So I just want to say, thank you, Apple. Your generosity has touched my heart, and made C++11 a reality.

  • BSD (Score:2, Insightful)

    by BasilBrush (643681) on Saturday April 20, 2013 @09:38AM (#43503463)

    One of the great things about Clang and LLVM are they are BSD licensed rather than GPL.

  • Re:BSD (Score:2, Insightful)

    by Microlith (54737) on Saturday April 20, 2013 @09:40AM (#43503471)

    So are you seriously trying to start this flamewar again? Do you have nothing else to say?

  • Re:BSD (Score:5, Insightful)

    by thatkid_2002 (1529917) on Saturday April 20, 2013 @09:50AM (#43503545)
    I can't see the harm in a compiler being GPLed. In fact, GPLing a compiler makes sense because it is a tool where users rights (distributing freely, mainly) are important and where contributing back optimisations is useful and important.
    What exactly is the advantage of a BSD license for a compiler?
  • Re:BSD (Score:1, Insightful)

    by Anonymous Coward on Saturday April 20, 2013 @09:53AM (#43503571)

    There is no "flamewar" to start. Some GPL advocates may feel the need to argue, but that won't change the facts.

    Let's review the facts:

    1) The BSD license (and similarly liberal licenses) promotes freedom for everybody, while the GPL goes out of its way to restrict freedom (namely, the freedom to not redistribute modified code).

    2) The BSD license is used by developers who are interested in creating high-quality software, rather than partaking in ideological squabbles.

    3) The BSD license is attractive to commercial users, who often provide very valuable financial and personnel support, and who still end up contributing their work back to the community.

    4) The BSD license is being used by more and more of today's new, successful projects. This is because it promotes free collaboration, rather than forced collaboration.

    So after reviewing the facts, it is clear that the BSD license and other liberally-minded licenses are the better options. They maximize freedom, they allow for true cooperation, and they avoid petty academic shenanigans in favor of getting real work done.

  • by rtfa-troll (1340807) on Saturday April 20, 2013 @10:13AM (#43503707)

    What makes you think it has anything to do with generosity?

    Assuming he's not a shill (in which case the answer would be his pay check), propaganda, stupidity and things like ESR's essay saying that the GPL is no longer needed.

    For a time, up to a few years ago it looked like programmers could become truly independent of the companies they work directly for, a bit like graphic artists, shop keepers, SAP specialists and so on. The basis of this would be that most companies would use the same FOSS software, sharing that from company to company. The vast efficiency gain would have been shared between the (no longer) customers of big IT companies like Microsoft and the programmers. Software would start to advance at the rate that benefitted its users, not the people stealing from them.

    Apple, and to a large extent Google, have come with new business models where they take the output of that process and rebundle it in a way which allows them to avoid sharing the key features which differentiate their products. In Google's case by keeping the most important bits on servers where you can't access it. In Apple's case by adding proprietary GUIs and other features which mean that nobody else can the free stuff and compete with them.

    LLVM is one of their key tools in trying to leverage that. This is done for profit, mostly by taking money out of the pockets of people like Slashdotters. It is a tool in ensuring they will be able to build developer environments where they take your source code and hide it from you. It is not a coincidence that we keep getting stories about there being lots of non-GPL software coming out etc. The shills want us to give them everything we have for free and have no need to return to the community.

    Correct answer: License under the AGPLv3 [gnu.org] whenever you can and only back off to the GPL or LGPL, let alone MIT licenses when someone gives you a really compelling benefit for doing so.

  • Re:BSD (Score:2, Insightful)

    by DarkOx (621550) on Saturday April 20, 2013 @10:41AM (#43503885) Journal

    1) The BSD license (and similarly liberal licenses) promotes freedom for everybody, while the GPL goes out of its way to restrict freedom (namely, the freedom to not redistribute modified code).

    The only freedom this limits in practice use is the freedom to profit off the work of others. I am not a supported of IP as a concept in general but it exists; to that end GPL has succeeded in ensuring there is a workable free ecosystem that I really don't think would exist with out it.

    2) The BSD license is used by developers who are interested in creating high-quality software, rather than partaking in ideological squabbles.

    So people who are not interested in licensing considerations don't think about it much; a tautology.

    3) The BSD license is attractive to commercial users, who often provide very valuable financial and personnel support, and who still end up contributing their work back to the community.

    This is true of the GPL and LGPL as well; both of which ensure that those commercial users actually do give back where the BSD and like licenses don't.

    4) The BSD license is being used by more and more of today's new, successful projects. This is because it promotes free collaboration, rather than forced collaboration.

    Yes and this is really unfortunate. Just like at all the time and energy wasted unlocking devices and such. I think its really to bad Linus did not take the kernel GPL3; if he had the droid ecosystem would actually be open. Your BSD licensed compiler sure will be great when you and I can't find a hardware platform to run it. Tivoization is quickly going to ensure that having free software will be of no use because all you will never be able to use anything but someone else signed binary blob anyway.

  • Re:BSD (Score:5, Insightful)

    by SuperKendall (25149) on Saturday April 20, 2013 @11:39AM (#43504243)

    The only freedom this limits in practice use is the freedom to profit off the work of others.

    Why is that so bad? If I'm writing code to share, I want others to use it. In that sense they are profiting, with code that works better/is more popular/comes out sooner. Just because some people ALSO profit monetarily should not matter to me in the slightest, again I am just happy someone could use the code I wrote.

    I am not a supported of IP as a concept in general but it exists; to that end GPL has succeeded in ensuring there is a workable free ecosystem that I really don't think would exist with out it.

    There are countless existing examples showing it does work: BSD UNIX itself, Webkit, and the very Clang under discussion. It is crazy to claim it does not work. Just because the GPL works fine as designed, does not mean a BSD approach cannot ALSO work.

    So people who are not interested in licensing considerations don't think about it much; a tautology.

    No; people who are not interested in the political aspect of licenses are forced to think about it anyway. By choosing BSD it reduces the amount of thought put into the license to the minimum, because it is the one with the greatest political freedom.

    This is true of the GPL and LGPL as well;

    As someone who writes some commercial software it is NOT true of the GPL3. It is true of the LGPL - which is why the FSF is trying to get rid of it.

    both of which ensure that those commercial users actually do give back

    No they don't. They just ensure that someone COULD legally go after them. But there are lots of violations we already see all over the place. As a company choosing the BSD is useful because you can be sure you are not in violation if someone forgets to contribute code back.

    People in companies who change open source code contribute back not because of the license, but because they don't want to risk changes being over-written in the future when updates are applied. It's (a) extra work and (b) (far more likely) something that has to be remembered or become process. Either way it's very likely that in a few years someone will forget and then disaster will follow. So companies have natural motivation far greater than the legal motivation to contribute source back.

    Yes and this is really unfortunate.

    In no way is it unfortunate. It's a good thing for ALL open source licenses that more people are comfortable using and sharing force.

    To start with, the GPL was needed to get people generally understanding that code should come back, and to provide some solid bases of code that were free. But at this point, the BSD is more useful to more fully open up companies to using open source in everything. Then after some time, the GPL can come into wider play again when companies understand that sharing source code works for everyone. So at this point BSD is doing more to help GPL than the GPL itself is.

  • by ShanghaiBill (739463) * on Saturday April 20, 2013 @11:43AM (#43504261)

    just that it's pure self-interest rather than generosity.

    So what? As long as good things get done, what difference does it make what the motivations are? If anything, selfish motivations are superior because they are more sustainable. I hope that other companies look at Apple's example, and come to understand that participation in Open Source is in their self interest too.

  • by SuperKendall (25149) on Saturday April 20, 2013 @12:22PM (#43504545)

    LLVM is one of their key tools in trying to leverage that. This is done for profit, mostly by taking money out of the pockets of people like Slashdotters. It is a tool in ensuring they will be able to build developer environments where they take your source code and hide it from you.

    Nothing could be further from the truth. By basing XCode on LLWM, it makes it EASIER to write third-party tools that can properly work over the source true with the same rich understanding of context.

    Prior to LLVM, when XCode was based more on GCC, XCode was the only thing that understood why it was parsing code the way it was for display and code completion. Now that any tool can have access to the same AST for the code that XCode is seeing, other software can act in ways that make sense for the code. More advanced re-factoring tools are now possible, thanks in large part to LLVM... Apple could have easily just built something like LLVM into XCode and left it totally proprietary.

  • by paavo512 (2866903) on Saturday April 20, 2013 @01:39PM (#43505069)

    C++ is now split into two factions; low-level C++ where you use it like C with classes, and high-level C++, where the language is treated like compiled javascript.

    What you mean by "split"? The main advantage of C++ is that it provides so many levels and paradigmas that one can smoothly shift the code around at a large scale, either in space or time. This also allows for real refactoring of the code and introducing new conceptual levels "inside" the language.

  • by Anonymous Coward on Saturday April 20, 2013 @01:53PM (#43505145)

    You didn't mention the actually good way to use C++. Expose elegant and easy to use interfaces that hide all the tricky optimizations that were required for performance. The business logic or your library clients never see a pointer. At the same time you are unconstrained about what you can do when you need to. The only way you can do that in most languages is to write the optimized code in one language, like C or assembler, and the high level code in some other language. Huge problem there is the overhead of cross-language dispatch (at minimum, no inlining) which means that the operations you expose have to be coarse grain and you have to somehow deal with accessing foreign memory layouts or you have to copy data. C++ simply doesn't have these problems. Templates is a huge feature designed in part for safety, but more-so to allow an extremely fine grained interface to your optimized code with no performance penalty. Migration of code is also no problem since your optimized and inefficient code are in the same language. You may have just been only exposed to poor C++ programmers, but more likely I think you simply do not have a full appreciation for what can be done in C++.

  • by SuperKendall (25149) on Saturday April 20, 2013 @02:03PM (#43505203)

    You are not a GPL supporter you are an astroturfing troll. Go away.

    I have supported free software, and RMS specifically, on Slashdot for years.

    If I am astroturfing, for who? And why would I do that for decades?

    Instead I am exactly what I say - a long-time software developer, currently an iOS consultant but before that an IT developer for over a decade and also a computer science graduate, who has cared deeply about the programming industry as a whole for a long, long time.

    I will not go away because other people need to know practical realities that all too many people on Slashdot want to ignore. I am here to help inform and guide those that people stuck in their ways would mislead.

    I would insult you in return at this point but the topic is too profoundly important for insult.

    Nobody is forcing you to benefit from my work. If you want to use my work in your product without obeying the GPL

    Why are you overlooking the many points I made?

    1) I don't want to benefit from your work without obeying the GPL. As I said in all my contracts I explicitly state that any code changes I make to open source libraries I am allowed to send those changes back in. In summary to be very clear, I WANT to send you back changes and obey the GPL. That is 100% not the problem in anything I've ever run across.

    2) As I stated the real problem is that a company or client does not want the legal exposure - even if they INTEND to give you back all changes, mistakes happen and they may simply forget. Far more likely is that in five years, someone maintaining the code base will not realize they are in a GPL protected portion of code (because it is VERY easy to stop in a debugger and change a line of code without looking at the header) and then also they have made a change they were supposed to contribute back and now have not. So there is an endless source of potential liability that they simply do not have with BSD code, where the expectation is that code will be given back but nothing will happen if you don't or forget.

    3) Some changes never make it back but they are not from people who would have used your GPL code anyway; in the meantime you DO get many changes back from people who also would not have used your GPL code but like to contribute changes.

    4) Nobody is forcing me to use your work. But you are forcing me to take on legal responsibility if I choose to use your GPL'ed work, beyond the mere technical effort needed to integrate your code. In my own code for my own company I do not mind at all using GPL code but for many other companies that is simply a non-starter, so your code just does not get used. You need to think about it from your side; are you producing the code to help people or not? I BSD license my own code because the reason I share is only to help others, not for the drive to have others grow my project. I don't care if parts of my code get folded into other things, or enhanced beyond all recognition into a thing of beauty that I will never see. The important part is that I helped in some way to make that possible; to for a brief time stand against entropy and for progress.

    Basically the problem is less with the GPL, and more with the legal climate in the U.S. especially (but really the whole world now) that is making the GPL less practical to use. Under such conditions the BSD works better as an explicit promise that you want other people to enjoy code and you have no intent or (much more importantly) CAUSE to sue someone who likes your code. It still communicates the desire that people send changes back; it just does not impose a non-technical and therefore unwelcome burden on the user. In fact it specifically relieves them of that unwelcome burden that is present in almost any other case!

  • by jonwil (467024) on Saturday April 20, 2013 @02:33PM (#43505381)

    If it was purely about disappointment with the GCC maintainers and their unwillingness to fix issues, accept patches, accept features Apple needs etc etc, it would have made more sense to take the well-developed GCC codebase and fork it. Get others who are also disappointed with the slow-pace of mainline FSF GCC to start supporting the new fork too and eventually the fork will most likely either take over as the de-facto implementation (with everyone shifting to it instead of the FSF GCC ala what happened with X when everyone shifted from XFree86 to x.org) or will get merged back into FSF mainline along with promises to make things better.

    But of course its not just about Apple hating the GCC devs. Its also about the fact that if Apple was to continue using/developing/distributing GCC (or a number of other pieces of software such as Samba) then they would have to either fork a really old version (not a viable option) or start shipping versions new enough that they are covered under the GPL version 3. And Apple cant ship GPL3 code because of the very broad patent grant clauses in there (which Apple cant accept because it would potentially let their competitors use such as Google use some of their patents for free)

  • by Pseudonym Authority (1591027) <SammyKakeNO@SPAMgmail.com> on Saturday April 20, 2013 @04:49PM (#43506175)
    GCC code based is a fucked-up, convoluted mess and is designed that way, due in no small part to RMS's fear that some evil proprietary coders might steal `his' code away from him. I pity the poor bastard who has to fork it.

If God had a beard, he'd be a UNIX programmer.

Working...