Re: Euphoria types of the POLL

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

Hi Shawn

It took me a while, but I figured out what you meant by this syntax:

sequence x[2] & x[3] nameAndAddress

I guess you are saying you want it to work like a class method, called by the
identifier x[nameAndAddress] (or dot notation) and returning a concatentation of
x[name] and x[address].

Class methods are certainly outside the scope of the poll and the discussion on
which the poll was based.

Your reference to "expressions" in Java confused me because expressions in Java
class declarations represent initialisation code, not methods. As far I know,
Java doesn't provide any method shorthand like the one you propose for Euphoria,
does it? You would have to declare and define the method in its own block.

Also, such syntax seems confusing in the context because in the previous 2
lines, x[2] and x[3] identify elements you want to declare by type and name,
whereas in the line above, the type and name attach to something else (a method
which I presume you intend to put in x[4] - not sure on that), and the x
references are an expression to be evaluated. I wonder how this would parse, but
it's outside the current poll in any event.

Cheers
Peter Robinson

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

Search



Quick Links

User menu

Not signed in.

Misc Menu