Re: pbr vs multiple returns

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jason Gade wrote:
> 
> 
> I'm not too sure about the challenges in making the caller specify pbr but
> could
> it just be a mechanism like typechecking? Unless typechecking is turned off
> then when the function is called the interpreter makes sure both the
> definition
> and the call itself has the 'ref' keyword.

The challenge is that I have to rework the parser to be aware of when it's
parsing arguments for a routine call, so that if it finds the PBR token,
it can remember that.  Also, if it finds that token anywhere else, it
should cause an error.

> Another thought, though, is that whatever word is used for 'ref' instead of
> an asterisk is going to break any programs that might use that same word as
> a variable name. Usually I prefer words to symbols but right now I'm not so
> sure...

Yeah, that was the dilemma I faced initially, and why I went with the 
asterisk.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu