What were some of your biggest breakthroughs while learning D?

Mathias LANG geod24 at gmail.com
Mon Jul 19 01:01:01 UTC 2021

On Tuesday, 6 July 2021 at 20:53:12 UTC, Dylan Graham wrote:
> [Inspiration from this r/C_Programming 
> post](https://www.reddit.com/r/C_Programming/comments/oeoq82/what_were_some_of_your_biggest_breakthroughs/)
> What's something you learnt or realised, a habit you developed, 
> something you read or project you worked on that helped 
> accelerate your understanding and/or productivity in D?
> For example, mixin templates finally clicking and you realise 
> how to use them in your code base. Stuff like that.

1) Not everything needs to be at compile time. It's perfectly 
fine to have your regexes initialized at program startup instead 
of having a bunch of ctRegex which will add 2 minutes of 
compilation time.

2) `immutable` is a special case, not the common case. `const` 
should be your default go-to keyword for attributes.

3) Simpler code is better. D gives you the tool to be very 
elaborate in your solution. Sometimes it's necessary, often it's 

The following are not D specific, but were learned while 

4) If it's broken, it's usually faster to fix it yourself.

5) If you put in the work, no one will stand in your way.

More information about the Digitalmars-d mailing list