D lesson 1: learn to read and steal code

aberba karabutaworld at gmail.com
Sun Jul 19 18:39:53 UTC 2020


Sometimes I forget how much value comes with open source. 
"Spoiled" by PHP, then JavaScript,..., before deep D, I wondered 
how some people live by not having docs. It may sound like a 
no-brainer but it was not immediately obvious or comfortable to 
do. You can live an entire career without looking up things... 
Imagine you don't get that same exact treatment in a language 
you've come to like.

It turns out sometimes reading code on how things are implemented 
from source code and even porting some to D teaches you things 
you may not otherwise have learnt any other way. The well 
thought-out code written by others help you leapfrog all the 
mistakes they may have made before coming up with that 
implementation. I'm learning everyday in d-land.

Can't say the same for some meta-programming monstrosity I've 
comes across though :) Also I still believe documenting code is 
very necessary for quick consumption of public APIs.


More information about the Digitalmars-d mailing list