const sucks
Sean Kelly
sean at invisibleduck.org
Tue Oct 21 12:48:56 PDT 2008
Bruno Medeiros wrote:
> Sean Kelly wrote:
>> Bill Baxter wrote:
>>>
>>> I recall Walter's main argument against it was that local variable
>>> really shouldn't be const-by-default since you're usually creating
>>> them because you want to manipulate them. But then you end up with a
>>> system where local variable declarations and parameter declarations
>>> follow very different rules.
>>
>> Pure functions already work this way, so perhaps this isn't a big deal.
>
> Are you sure of that? Reading the latest about pure:
> http://dobbscodetalk.com/index.php?option=com_content&task=view&id=745&Itemid=
>
> I don't see were you can infer that.
I simply meant that pure functions require reference parameters to be
const, not that they are implicitly const.
Sean
More information about the Digitalmars-d
mailing list