Communicating between in and out contracts

Steven Schveighoffer schveiguy at yahoo.com
Tue Oct 20 08:44:00 PDT 2009


On Tue, 20 Oct 2009 08:36:14 -0400, Michel Fortin  
<michel.fortin at michelf.com> wrote:

> On 2009-10-20 08:16:01 -0400, "Steven Schveighoffer"  
> <schveiguy at yahoo.com> said:
>
>> Incidentally, shouldn't all access to the object in the in contract be   
>> const by default anyways?
>
> Hum, access to everything (including global variables, arguments), not  
> just the object, should be const in a contract. That might be harder to  
> implement though.

Yeah, you are probably right.  Of course, a const function can still alter  
global state, but if you strictly disallowed altering global state, we are  
left with only pure functions (and I think that's a little harsh).

-Steve



More information about the Digitalmars-d mailing list