ES2015 symbols (originally, at least, from Racket) are an underappreciated innovation that make it easier to build and communicate good OO designs (in the Smalltalk sense).
-
-
Replying to @wycats
I think similar features have existed for a long time in other OO systems such as Smalltalk and CL. The most Racket-inspired parts of
@littlecalculist's original `private` proposal got dropped along the way. But overall, definitely a win.1 reply 0 retweets 0 likes -
Replying to @samth @littlecalculist
What Smalltalk feature is analogous? In particular I'm referring to a syntactic and ergonomic distinction between the kernel of an OO API from its intended usage (and in some cases, from the "interface to implement" and the intended API surface)
1 reply 0 retweets 0 likes -
Replying to @wycats @littlecalculist
I think it was called namespaces in Smalltalk.
1 reply 0 retweets 0 likes -
Replying to @samth @littlecalculist
Ah. Sometimes people use abstract to signal the "kernel" distinction in typed languages, but: 1. That creates a conflict between adding a default impl and retaining the signal 2. It doesn't communicate to readers of API users that the code is doing something "kernel"y
2 replies 0 retweets 0 likes -
I think it's possible to use namespaces for this purpose, but it doesn't fall out as easily the way it does with symbols.
1 reply 0 retweets 0 likes -
Replying to @wycats @littlecalculist
RIght, I think symbols are a particularly nice way of doing this. I do wish we had done Dave's original `private x` syntax, though.
1 reply 0 retweets 1 like
The thing that symbols buy you imo is a way to use the flexibility of lexical scope and good module systems along with OO concepts. The two compose very very nicely, and are (to me) notably missing in Ruby and Smalltalk.
I'm hoping for (and trying to champion) private #x, btw
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.