Re: Ideas for next Eu

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

On Wed, 10 Nov 1999 01:17:56 GMT, Lewis Townsend <keroltarr at HOTMAIL.COM>
wrote:

>This is an excellent suggestion IMO. For those who want a specific
>example, here's one I have seen before.
>
>----- code ---------
>include get.e
>constant
>  err = 1,
>  val = 2,
>  string = "{1,2,3}"
>? value (string)[val]
>--------------------
>

But the error_status has a purpose.  Why throw it out?

But I do like this idea:

-- code --
include get.e

object string, err, val

string = "{1,2,3}"
{err,val} = value(string)

if err = GET_SUCCESS then  -- why not do some error checking?
  ? val
end if
-- end code --

No need for a temporary sequence to hold the result of value() and no need
for constants to make the code more readable.

But this topic has been thrown around quite a bit since I've found Euphoria
and I think the general consensus is that most would like to see the second
example doable.  There seem to be mixed feelings about indexing a
function... (which I feel is a bit hard to follow as far as readability,
but it's an interesting concept).

-- Brian

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

Search



Quick Links

User menu

Not signed in.

Misc Menu