A New Revealation: Semi-Permeable Membranes
Wed, 27 Oct 1999 10:49:14 -0700
> >As far as the frequency of voids is concerned, I also observer that
> >functions--single-method objects with only the default "run" method--will
> >indeed just about never be void since there's no state to change.
> [-] Say what! Write "Lambda Abstraction" on the wall 100 times.
> Why should functions have any less access to mutable state than objects?
How does having 1-run-method vs multiple methods effect what state they
have? For an example of a stateful void-revealing function, look at the
"cancel" function inside the smart contract for the covered call option at
> >In saying
> >voids are rare, are you looking at examples with lots of functions and
> [-] No, but I may be programming in a more side-effect-free fashion.
> >Whether the default-to-void can be made to work or not, I find this
> >pleasing enough, given the extra functionality it enables, namely the
> >checking. Certainly the type checking will be handy for security
> >On the other hand, I would wish we didn't have to introduce the
> >type-mechanism on the first page of the intro to E, but so it goes. On
> >third hand, a lot of people will actually find it attractive to have type
> >checking on the first page, though it does complexify the first examples.
> [+] I feel the same way.
> I expect an initial explanation for the novice may say merely
> Write ": any" when you want to reveal a value and ": void" when you
> We'll explain later.
> but you're the explanation expert. What should we say?