Re: E 0.9.1b Breaks Old Code

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
On Feb 21, 2008, at 19:57, Toby Murray wrote:

> I've got some old E code that fails to run correctly on newer versions
> of the E runtime (specifically with the current stable 0.9.1b and
> current svn head).
>
> The specific problem seems to be that remote captp URIs are being
> resolved to null, rather than far references.
>
> Example code below:
>
> $ cat testClient.e
> def getObjectFromURI(uri) :any {
>     introducer.sturdyFromURI(uri).getRcvr()
> }


This is the "easy-return" syntax switch.

All method and function bodies now return null, unless you use the  
return-ejector.

def getObjectFromURI(uri) {
     return introducer.sturdyFromURI(uri).getRcvr()
}

Before easy-return, the rule was that the result guard is void by  
default, so writing an explicit result guard enabled returning a  
value; this is why your code has ":any".

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.