On Monday, 14 January 2019 at 10:06:48 UTC, Mike Franklin wrote:
On Monday, 14 January 2019 at 05:31:27 UTC, Paul Backus wrote:
When something like an object system is made part of the
language (or at the very least, the standard library), it
becomes a focal point [2] that the community can coordinate
around. Due to the diverse, distributed nature of any
programming-language community, trying to coordinate through
explicit communication is not really a viable option, so
having these kinds of focal points is very important if we
want to be able to work together on anything.
[1] http://winestockwebdesign.com/Essays/Lisp_Curse.html
[2] https://en.wikipedia.org/wiki/Focal_point_(game_theory)
I think D's structs are a sufficient object system for such a
focal point. With design by introspection, `alias`, templates,
`alias this`, `static if`, CTFE, mixins, and a few new D
features, classes would be unnecessary. Rust and Zig are
pretty good examples of this.
D's implementation could even be improved to keep its runtime,
yet still allow D to be used as I'm suggesting, without
introducing any breakage for anyone. I made some significant
progress in that direction when I was working on the compiler
in the 2017~2018 timeframe, but my abilities ultimately fell
short, and I couldn't see a way forward without support.
Mike
Killing classes will kill my interest and investment in D.
Alex.