| The thing what people don't get with C++'s complexity is that complexity is unavoidable. It is also there in Ada, C#, Java, Python, Common Lisp,.... Even if the languages started tiny, complexity eventually grows on them. C23 + compiler extensions is quite far from where K&R C was. Scheme R7 is quite far from where Scheme started. Go's warts are directly related to ignoring history of growing pains from other ecosystems. |
| > Even if the languages started tiny, complexity eventually grows on them. And then of course the case that proves the opposite, Clojure. Sure, new ideas appear, but core language is more or less unchanged since introduced, rock solid and decades old projects still run just fine, although usually a bit faster. |
| |
| ▲ | pjmlp 3 hours ago | parent [-] | | That is because Clojure is done, there is hardly anything being done other than probably what matters to NuBank and Datomic mostly. Also its market share adoption kind of shows it. | | |
| ▲ | honr 2 hours ago | parent | next [-] | | The current market share shows how far you can go with just being a better Java. If (or when? I haven't checked recently) a decent and well-thought-out LLVM backend emerges for it, ideally with some new underlying complexity seeping through, the market share might expand overnight. And as for C++, while some complexity is certainly unavoidable, a rigorous complexity control is desperately needed. Ideally, the same way Bell Labs folks did when they initially conceived Go from Algol68 and C and similar (before or after joining Google; I couldn't tell), and Rich Hickey did when he initially designed Clojure. Some people are managing the complexity using style guides and clang-tidy checks. Which is great in that doing so doesn't need lengthy language committee decisions. But that approach hasn't been enough to make code _sufficiently_ safe; every now and then an enterprising engineer or team finds a way to abuse a feature in a way that produces unsafe or unpredictable results. Rust is a bit better and solves a few of the common problems, but sadly the list of potential issues (of using Rust in a codebase at scale; Engineers' faults, not Rust's) is long and growing. My verdict is we need both complex and simple LLVM languages, ideally co-designed to have no interop problems by design, while allowing expressing some logic in the simple parts and some logic in the complex parts. Or better, a 3 tier design would be nearly perfect: expressive config language, glue and research language, and core building blocks language. I think a clojure-style language can be designed to achieve all three. | |
| ▲ | zdragnar 3 hours ago | parent | prev | next [-] | | That's a pretty far cry from "complexity is unavoidable". Reading that to me implies that the complexity is inherent in programming language design, whereas this follow-up argument seems to say that complexity is the result of tacking on new features. The latter is a bit tautological, since the size of the language grammar is itself a measure of complexity. | | |
| ▲ | pjmlp 2 hours ago | parent [-] | | I think they even haven't adopted newer JVM features, it is a hosted language designed to depend on its host, plus it is a Lisp. The complexity would be to grow like Common Lisp, instead it is up to Clojure folks to write Java, C#, JavaScript code, therein lies the complexity. |
| |
| ▲ | embedding-shape 3 hours ago | parent | prev [-] | | > That is because Clojure is done Yes, that's one approach to avoiding ever growing complexity, maybe the other languages should try it sometime ;) With that said, everything around Clojure keeps improving and getting better. While the language doesn't have static types, clojure.spec offers something that is even better than static typing (imo), and doesn't even require any changes to the core language. Something else other mainstream languages could learn too. | | |
| ▲ | pjmlp 2 hours ago | parent [-] | | Is Typed.Clojure finally stable and sound? In theory we only need parentheses, prefix operators and a REPL, but mainstream never went down that route. Anyway the complexity then ends up being custom DSLs and macros. |
|
|
|