Posted Dec 13, 2005 23:36 UTC (Tue) by ncm
In reply to: lambda functions
Parent article: The Boost C++ Libraries
Inheritance (of whatever variety) and automatic conversions certainly are "fancy features". They don't belong in the core of a language. A language more powerful than C++, and less encumbered with legacy compatibility, would have them in the standard library. Lambda is hardly a feature at all -- it's a notational detail -- and probably *does* belong in the core language.
By "directly useful", I mean operations that actually perform computation, resource management, control flow, and I/O, as opposed to primitives that organize code (e.g. types). Everybody's long since conceded that I/O belongs in the library. That was a radical notion until C thrashed Pascal. Threads were supposed to be built in, too, until C thrashed Ada too. Progress in language design lies in discovering that apparatus previously considered indispensable amounts to trivial applications of a more powerful core primitive.
CONS may be one or two instructions, but CONS implies garbage collection, which is enormously more intrusive than Ada's failed built-in threads. The presence of CONS in the core language concedes that the language is incapable of coding resource management as a library facility. GC is actually worse than that: even if the language is otherwise up to the job, GC interferes so as to make it impossible anyhow.
The MLs are almost expressive enough to take on C++, but are encumbered with too many of LISP's fundamental mistakes.
The belief that C++ was a shoe-in, and is now thoroughly entrenched, is the most pathetic sort of sour grapes. C, in the 80s, and now C++, got used because they have proven useful and usable where they are needed. Academic languages aren't used precisely because they have turned out not to be so. Instead of whining about industry's supposedly dogged conservatism, try rethinking your own dogmas. That's what science and engineering are all about: when experience says your idea is wrong, reject the idea, not the experience.
The world needs a language more powerful and cleaner than C++. It won't be built by people who can't even understand why C++ succeeds, or why its academic competitors have failed over and over again.
Companies that have used academic languages successfully have either used them as fancy scripting languages (e.g. Yahoo stores) or depend heavily on calling out to libraries coded in an industrial language (e.g. ITA Software). LISPies like to say that Python and Ruby are really just dressed up LISP, but they're wrong: LISP is really just stripped-down Python.
to post comments)