3 ms·
There is nothing scary in new features if they are built on the same basic principles, carefully elaborated, sound and consistent. People added features to lan
by ernst_klim 8y ago
There is nothing scary in new features if they are built on the same basic principles, carefully elaborated, sound and consistent.
People added features to languages like scheme, ocaml, lisp for decades, and it was fine. There are type systems for racket, object system for ocaml, pattern matching for lisp, all of which are simple and fit into the design of the language well.
The problem with C++ is that it was based on the C language, which already was an example of terrible design (by modern standards), and new features also were half-baked or badly designed (SFINAE, accidentally turing-complete templates, 666 *values, too much implicitness and unnecessary entities, like constructors).
So far rust is very nice, concise, elaborated and explicit language. Hope that the new features would be as elaborated and neat, not just monkey patches.
- Dylan16807 8y ago> SFINAE, accidentally turing-complete templates Template meta-programming is awful but that particular type of turing completeness isn't a problem at all. Mere arithmetic and some kind of ability to loop gives you that kind of turing completeness. The typical compiler limits looping depth to a couple hundred, and the problem is solved. Such a construct isn't a notably slow use of templates either. It's more trouble to avoid it than to have it. Compare some macros that can't loop and need a bunch of extremely repetitive lines for different sizes.
- ernst_klim 8y ago>Mere arithmetic and some kind of ability to loop gives you that kind of turing completeness I need my typechecker be total. And you don't need turing completeness for arithmetic and recursion.
- Dylan16807 8y ago> I need my typechecker be total. Recursion limits make it total, very easily. > And you don't need turing completeness for arithmetic and recursion. Yes you do. If you allow basic arithmetic to recurse n times, it can simulate n iterations of a turing machine.
- ernst_klim 8y agoYou don't need infinite loops, all you need are simple inductive types and reduction rules, it has not to be a turing complete language. You can have simple typelevel functions in haskell, whilst its typechecker is not turing-complete.
- DonHopkins 8y agoHi, Ernst! Sorry I never heard back from you. Have you had a chance to read any more Eric S Raymond quotes? Don't you agree that his book is factually incorrect? Are you still mad at me for exposing him as the racist gun nut whack job that he really is, by quoting and linking to his own words and his death threat to Bruce Perens -- was that unfair? Drop me an email! ;)
- pjmlp 8y ago> The problem with C++ is that it was based on the C language, which already was an example of terrible design (by modern standards) I guess by modern you mean 1980, given the alternatives.