LWN.net Logo

lambda functions

lambda functions

Posted Dec 8, 2005 22:24 UTC (Thu) by mvogt (guest, #34379)
In reply to: lambda functions by ncm
Parent article: The Boost C++ Libraries

I think that Boost and similar library projects have gone a long way to finding the current practical limits of library-based development in C++. This is important because it has given a much better indication of what language changes are required to continue moving forward.

If you read through the language change proposals for C++0x, a lot of them address cases where the current system has been found to run up against its limits. And for those who find the current templates-plus-overloading-plus-inheritance mechanisms too inelegant, Daveed Vandevoorde's Metacode proposal is a possible way this will be rationalised in a future language revision.

I won't touch your LISP... criticism... but I agree that there's no credible alternative to C++ for many industrial purposes. Where I think C++ shines especially, is the ability to do extremely low-level tasks, but to wrap those tasks in useful higher layer abstractions.

A good example of this would be the Spirit library (distributed in Boost), which wraps extremely low-level character-by-character text processing, into a syntax which is very similar to directly coding EBNF.


(Log in to post comments)

lambda functions

Posted Dec 9, 2005 1:49 UTC (Fri) by ncm (subscriber, #165) [Link]

It takes nothing away from LISP or its originators to identify its flaws, in hindsight. LISP is not only fifty years old, it is based on a design never meant to be implemented! How much was understood, back then, about software engineering? Clearly the only fault is in those who have failed to learn from the mistakes, over and over again. Over the decades since, academic toy languages have incorporated many important ideas that ought to be more readily available to engineers, but are too often tangled up with those fifty-year-old mistakes. The Boost crew deserve Turing awards for teasing out many of the good ideas and putting them into a useful library.

The lack of a credible industrial alternative to C++ isn't just bad luck. It is incontrovertible proof of systematic failure, over decades, by those responsible for evaluating language designs.

By the way, the expressions "low-level" and "high-level", in my experience, are readily abused to prejudice discussion. Most usually this means disparaging concerns for performance and trying to distract the reader from fundamental inefficiencies. I'm not accusing Mr. Vogt of such usage. Rather, I'm pointing out that the words have acquired very slippery meanings, so that their use often obscures more than it reveals.

lambda functions

Posted Dec 17, 2005 20:06 UTC (Sat) by renox (subscriber, #23785) [Link]

While I agree that languages usually do too much, C++ is not the solution:
1) the code used in Boost or other similar library is so complex that some compilers wouldn't compile it
2) those library are unreadable
3) sometimes this complexity cannot be hidden to the users which makes ugly code..

Have you looked at Scala? I think that this language is a step in the right direction for this part, unfortunately it is only for JVM or .Net no native compilation currently.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds