const again

Derek Parnell derek at nomail.afraid.org
Thu Dec 6 17:24:11 PST 2007


On Thu, 06 Dec 2007 16:57:20 -0800, Walter Bright wrote:

> Ary Borenszweig wrote:
>> Why not
>> 
>> macro x = 3;
>> ?


> It's been suggested several times. 

I definitely think that overloading 'enum' to declare definitions is quite
a lot worse than overloading 'macro' or 'alias'.

> It doesn't make much aesthetic sense 
> to do things like:
> 
> 	macro int x = 3;

It doesn't?!? On what authority have you made that assertion?

I makes perfectly good aesthetic sense to me, more so than 'enum'. 

  enum defname = "upload.log";

is NOT an enumeration as there is no numbers involved.

  macro defname = "upload.log";

looks more pleasing and grokable IMNSHO.


And what do you say about the idea to group together such definitions?

  macro
  {
      a = 3;
      b = "qwerty";
      c =  61.74;
  }

rather than ...

   macro a = 3;
   macro b = "qwerty";
   macro c =  61.74;


-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
7/12/2007 12:16:16 PM



More information about the Digitalmars-d mailing list