4 ms·
There is another way this is true: any directly useful core feature in a language exposes a weakness in the language design. If it could have been coded as a li
by ncmncm 4y ago
There is another way this is true: any directly useful core feature in a language exposes a weakness in the language design. If it could have been coded as a library feature, because the language was expressive enough to enable that, there would have been no need for the finished core language feature.
But the feature might not actually be in the standard library for your actually-powerful language, yet.
- eternityforest 4y agoI think it's the other way around. The lack of expressivity is a strength. My idea of a good programming language is heavily focused on making it hard to write bugs. The more flexible the language, the harder it is for the compiler to understand it, and the more you encourage random tinkering over bog standardness. Great for academic language, but in production, the ideal language tries it's best to keep you from doing anything clever. Core language features tell me that the designers said "This is common, let's provide this one way to do it and not bother with enabling any other ways".
- lmm 4y agoI do agree with making it easy to constrain what you write. But I don't think having lots of core language features is a good way of doing that. A core language feature is generally an ad-hoc special case that breaks the rules of the language, almost by definition. Which means it probably interacts poorly with other language features. (For example, if you use a language which has keywords for async and keywords for exceptions, they will probably interact badly; if you use a language that encourages ordinary functions for async and error handling, they will probably play nice together).
- metadat 4y agoAny concrete examples of what good looks like?
- lmm 4y agoHaskell, TCL.
- eternityforest 4y agoHow do you do the equivalent of static typing in TCL?
- ncmncm 4y agoA sufficiently expressive language enables the library author to constrain its usage to prevent bugs. This is why sufficiently modern C++ programs have no memory usage errors. It would be extra work to code them.
- kaba0 4y agoI believe this great talk is a must for anyone interested in the topic: https://m.youtube.com/watch?v=_ahvzDzKdB0 https://m.youtube.com/watch?v=_ahvzDzKdB0 (Do give it a few minutes if you don’t find it useful in the beginning, it will make sense I promise)
- barking_biscuit 4y agoThis starts off very strange and quirky and the moment it clicks was a very magical one for me the first time I watched it many years ago. It's one of my all time favorite talks.
- ncmncm 4y agoGuy Steele has fallen much farther from grace than almost anyone has risen.