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 @notlaforge
Not quite. I mean to clearly separate the entire space of the "kernel API" of a class from its convenience methods. Even in a nominal system, it becomes drastically easier to write a good subclass if you know what the kernel surface is.
1 reply 0 retweets 4 likes -
Replying to @wycats @notlaforge
For example, in Ruby, it's very hard to write a subclass of Hash because there's no kernel that methods like merge use (look at HashWithIndifferentAccess as an example). And worse, it's hard to add conveniences to the superclass without breaking subclasses
2 replies 0 retweets 1 like
Symbols make it easy to signal which parts of the API are the kernel bits, and therefore which parts need to be implemented in order to get the right behavior out of convenience methods. OO design is hard so it doesn't magically work, but it helps the design and communication.
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.