bearophile wrote:
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,

I meant future D flexibility.

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.

No, I'm not, actually. I've actually never worked on a large project. I'm not a computer scientist.

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).

Yes, but it has MORE THAN ONE.
Some specifics -- it'd be nice to have a Windows version specified as an integer. It'd be nice to have a DirectX version number. Can't do it.

version(int) is like a programming language with one variable. It's ridiculous.

Reply via email to