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).
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)
-
-
I think it was called namespaces in Smalltalk.
-
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
-
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.
-
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.
-
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
End of conversation
New conversation -
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.