D Style document
Dejan Lekic
dejan.lekic at gmail.com
Sat Mar 8 15:34:03 UTC 2025
On Saturday, 8 March 2025 at 11:30:44 UTC, Paul Backus wrote:
> D has been around for more than 20 years, and core D projects
> like DMD, druntime, and Phobos contain a lot of old code that
> does not hold up to modern standards. So the fact that
> SNAKE_CASE constants are used in some parts of druntime is not
> a strong argument for using them elsewhere.
>
> Also, druntime in particular uses a lot of `extern(C)`
> bindings, and SNAKE_CASE is the standard way of naming
> constants in C.
>
> Of course, you don't have to follow the D style guide for your
> own projects if you don't want to. For example, I use tabs for
> indentation in my personal projects, rather than spaces like
> the style guide suggests.
Thanks Paul! So do you think people who are working on libraries,
ie. code that is supposed to be used by a wider D developer
audience, should follow the D Style document?
More information about the Digitalmars-d
mailing list