4 ms·
Compiler giving a compiler error still favors the writer, not the reader of code. It seems like in its design in general D favors the writer of code with all i
by throwawaymaths 2y ago
Compiler giving a compiler error still favors the writer, not the reader of code. It seems like in its design in general D favors the writer of code with all its complicated bells and whistles that one must keep in mind as a reader. I think decades of experience has shown us that it is way better to favor the reader.
- WalterBright 2y agoYou can do it either way in D. It's nice to have a choice! I use both methods, depending on the context.
- mst 2y agoSeems like "if it's obvious where it came from, use the unadorned name, if it'll be non-obvious to a future reader, use the more explicit form" is a solid heuristic and letting the programmer decide is a feature. (it might be worth having some sort of lint option that will flag using the non-explicit form because I can see large multi-developer projects finding it preferable to add 'use the explicit form' to their local coding style ... but I don't have a dog in this fight so 'free thought, worth exactly what you paid' applies ;)