Comfort Break
We’re certainly not there yet, and we—everyone—have plenty more to explore first. Always reflect on what you’d like in a language rather than sticking to what existing languages give you and soldiering on. Thinking about type systems is part of this.
Here’s a relevant and poignant example from Java. If you’ve used Java, you might have needed the .clone() method a few times. Recall how it gets used, though—typically like this:
| | Foo orig = Foo.new(); |
| | Foo copy = (Foo) orig.clone(); |
Why is that cast needed on the second line? Is it just because that’s the Java way and you’ve gotten used to it? Or does it point to a weakness in the language? It is rather annoying to have to write down information that is very obvious to the programmer, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access