If D becomes a failure, what's the key reason, do you think?

BCS BCS at pathlink.com
Fri Jul 7 16:55:54 PDT 2006


David Medlock wrote:
> 
> 
> I am not *against* it, I just disagree with people who say its a feature 
> D cannot succeed/compete without.
> 
> I am all for the concept, just not the C++ idea of it.
> 
> 
> For a better one how about the _let_ construct in ML languages:
> 
> let var = expression in <statements> end
> 
> During <statements> the var cannot be modified and the compiler checks 
> this.  Note this is *single assignment*, not exactly the same thing as 
> the type modifier in C++.
> 
> -David

How would this be used to ensure immutability with references passed to 
functions? ML doesn't seem to have reference types but D does so the 
implications need to be considered. There must be some sort of assertion 
that a function won't modify something or it becomes meaningless. This 
implies a const type attribute of function parameters.

Reference types are not going to go away so we need some way to deal 
with them.



More information about the Digitalmars-d mailing list