Re: Confirmation for 2.3

new topic     » goto parent     » topic index » view thread      » older message » newer message

aku wrote:

>2. object x = 123

I agree, this would be a great addition.

[Idle speculation follows...]

It seems odd that you can define a constant like:

   constant junk = "123"

and not be able to do the same with:

   object junk = "123"

Obviously, the parser can handle the syntax.

Perhaps Robert thinks it's not sufficiently "Euphoric" or minimalistic. One 
only has to look at the constant declaration to see that it's "Euphoric"; I 
don't know what might be objectionable with the construct. I suppose you 
could argue that it's not needed, since:

   object junk  junk = "123"

already takes care of that. But being able to assign the value where the 
variable is declared means you are less likely to forget about it, leading 
to better code. If my goal was to use a minimal language, I'd use a Turning 
machine.

Another argument might be that the declaration section of the code is 
seperate from the assignment section. But that's an artificial constuct of 
the grammar - logically, it makes sense for the assignment to be bound with 
the declaration.

Robert might take the "added value" argument, that the benefit of the 
feature doesn't outweigh the cost of adding, testing, documenting... After 
all, things work just fine without it. I have difficulty believing that 
there is that much cost to adding this particular feature, and can't think 
of any code that would break as a result.

There is perhaps some technical reason why this is difficult to implement. 
Given that Robert is a professional compiler writer working with his own 
program, I think this can be eliminated.

The only thing I can figure is that he just doesn't see that much demand for 
it, so it's low on his priority list.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu