version assignment and module scope
    ketmar via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Mon Sep 15 14:43:05 PDT 2014
    
    
  
On Mon, 15 Sep 2014 21:26:27 +0000
dcrepid via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
wrote:
> Could this be considered a defect of design?
no. it works the way it's intended to work. given that order of module
imports is not defined (i.e. reordering imports should not affect
resulting code), making 'version=' propagating to other modules will
create disasterous side effects, even weirder than C macro abusing.
"#define" is BAD, but in C you can at least control order of imports.
in D you can't, so making 'version=' affect other modules will turn
everything to hellish nightmare.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20140916/b711bcfd/attachment.sig>
    
    
More information about the Digitalmars-d-learn
mailing list