Ramifications of const

eao197 eao197 at intervale.ru
Wed Jun 13 09:25:14 PDT 2007


On Wed, 13 Jun 2007 17:30:27 +0400, Don Clugston <dac at nospam.com.au> wrote:

>>> It might be useful to have "does chanege its arguments" as a flag  
>>> which can quickly be checked during compilation, even if it is  
>>> deducable from the argument declarations. This may speed things up.  
>>> But the *more* important flag would be whether the function may change  
>>> "external" things. This is hard to see without a flag in the signature.
>>  I think if someone want to have 'pure functions' then it is better to  
>> look to functional programming languages.
>
> And it's one of the good ideas from functional programming languages.
> Note that any pure function is a candidate for CTFE (if called with  
> constant arguments), so it's becoming useful for D.

But why trying to transform D to a functional language instead of use one  
of such languages?

-- 
Regards,
Yauheni Akhotnikau



More information about the Digitalmars-d mailing list