unpaintable (the solution to logical const)
Jason House
jason.james.house at gmail.com
Sat Apr 5 17:02:39 PDT 2008
Janice Caron wrote:
> On 05/04/2008, Jason House <jason.james.house at gmail.com> wrote:
>> Other interesting alternative I thought of is "quarantine". Walter
>> might like that it'd claim the title of the longest keyword in D :)
>
> On that basis, let's call it supercalifragisticexpialidocious :-)
you'll really mess people up by spelling it wrong ;)
proper spelling: supercalifragilisticexpialidocious
>
>> I don't think of this stuff as logical const. Logical const allows const
>> functions to access mutable data. As proposed, this does not allow that.
>
> I think you'll find it does. :-)
Quoting your post that started this thread:
"For functional programming to work, you need one additional
restriction: pure functions are only allowed to access fields which
are either paintable or invariant. (In the current regime, all fields
are paintable)."
Looking back, I guess I was mixing what should be done for const and what
should be done for FP. I think this mixing is too common in our threads
and has led to tons of miscommunication.
It really unfortunate that we use FP as our justification for const stuff
but then design const that really isn't useful for FP.
More information about the Digitalmars-d
mailing list