6 ms·
I don't think it should be baked into the language. With a good macro or compiler plugin system, you can implement composition as a library. This is already the
by sreque 14y ago
I don't think it should be baked into the language. With a good macro or compiler plugin system, you can implement composition as a library. This is already the case for languages like Haskell, Racket, and Scala.
The more general ideas that underpin a composition implementation are the abilities to access class/interface metadata at compile time and to generate code programmatically at compile time.
- stcredzero 14y agoTrue, but being able to roll your own OO style has the potential drawback of fragmenting the language's libraries.
- davidw 14y agoThat was always a problem for Tcl: the language is flexible enough that you can write an OO system in Tcl, or via its C API, but with several around, and non distributed with Tcl, you couldn't really count on any of them, or worse, you might find two bits of code depending on two different systems. I think they've finally cleaned this up some, but I view it as a mistake.
- manveru 14y agoYeah, [incr Tcl] is now part of 8.6. There's no final release yet though.
- thebigshane 14y agoSimilar to the "The Lisp Curse": http://winestockwebdesign.com/Essays/Lisp_Curse.html http://winestockwebdesign.com/Essays/Lisp_Curse.html Every project has friction between members, disagreements, conflicts over style and philosophy. These social problems are counter-acted by the fact that no large project can be accomplished otherwise. "We must all hang together, or we will all hang separately." But the expressiveness of Lisp makes this countervailing force much weaker; one can always start one's own project. Thus, individual hackers decide that the trouble isn't worth it. So they either quit the project, or don't join the project to begin with. This is the Lisp Curse.
- sreque 14y agoI like the idea of having a standard object system in the language, don't get me wrong. But having a standard object system and baking compositional inheritance as a core primitive of the language are two different things. The latter isn't a terrible thing at all. I just believe that there are more general language features that subsume it.