5 ms·
> The key is to realize C++ is not a language, but a federation of languages. You need to cherry pick a subset you what you want to use and stay disciplined. Ot
by msla 7y ago
> The key is to realize C++ is not a language, but a federation of languages. You need to cherry pick a subset you what you want to use and stay disciplined. Otherwise, it is a mess.
I've noticed two strains in language design, which I internally call Scheme-style and Common Lisp-style:
Scheme-style languages are the trimmed-down languages, often built around a big idea which animates the rest of the design but not always; the defining concept of Scheme-style languages is always how much they can remove to get a pure design, a design which supports writing code in one style. Python, Smalltalk, C, and Scheme are all languages in this mold. Java is kind of a compromised Scheme-style language, or two of them (C and Smalltalk) rammed into each other at high speed, which also goes for Objective-C.
Common Lisp-style languages have mini-languages inside of them, or at least support multi-paradigm programming as a core design goal; you can trim a Common Lisp-style language into a Scheme-style subset, but you can't extend a Scheme-style language into something more Common Lisp-like unless you really are dealing with Scheme and have (hygienic) macros to use to add more syntax. C++, Perl, and Common Lisp are all Common Lisp-style; Unix shell is Common Lisp-style in practice because it encourages programmers to write in a bunch of relatively Scheme-style languages at once, all in the same program.
Note that both Scheme and Common Lisp have a conceptual core in the Lambda Calculus and axiom-like special forms. C++ lacks this and Perl doesn't really have it either, but most people don't write huge codebases in Perl.
- kazinator 7y agoScheme is only about removing features from a language document, not from actual systems.
- gmfawcett 7y agoArguably, modern Scheme is about removing features from a language document, and putting them in another language document.
- mroche 7y ago> Java is kind of a compromised Scheme-style language, or two of them (C and Smalltalk) rammed into each other at high speed, which also goes for Objective-C. Not much to add to the conversation here, but for some reason every time I read this it gets funnier and funnier. But I do like your breakdown, it’s what I’ve been thinking whenever I see discussions like this.
- fiddlerwoaroof 7y agoObjective-C is kinda nice, if you lift the Smalltalk part out and transplant it into Common Lisp: https://github.com/fiddlerwoaroof/objc-lisp-bridge#type-directed-objective-c-extractors https://github.com/fiddlerwoaroof/objc-lisp-bridge#type-dire... (for a whole program look at: https://github.com/fiddlerwoaroof/objc-lisp-bridge/blob/master/reading-list-reader.lisp https://github.com/fiddlerwoaroof/objc-lisp-bridge/blob/mast... )