removal of cruft from D

bearophile bearophileHUGS at lycos.com
Mon Nov 23 08:58:18 PST 2009


Don:
> There seems to be no point in having a *single* integer value, shared 
> between the app and all libraries! It's just reducing future flexibility.

It doesn't reduce flexibility at all, because if you need something more complex you don't use it and nothing bad happens. You can even ignore it.
You are thinking about 10000+ lines long apps; about scaling up. I am thinking about single-module 500-lines long programs that replace some scripts; about scaling down too.
A compilation constant avoids me to modify the source every time I need to change the size of some static array/matrix. With that I just need a second Python script that calls dmd/ldc with a different argument, instead of a little more complex Python script that changes the source code of the D program, to modify the constant.
A very modern language like Fortress, designed for physics, has that small feature :-) (It's available in C too, only integer/symbol constants).

Bye,
bearophile



More information about the Digitalmars-d mailing list