Re: Ideas for next Eu

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

Hello

Brian Broker <bkb at CNW.COM> wrote:

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

There are situations that arise in which you know that the
string you are passing to value() will work. In these
situations it's a bother to have to use a temp variable and
still would be with:

{status, value} = value (string)

because I would then have to make sure I had a "status"
variable declared or at least junk or temp. I could live
with this if I could do this:

{0, value} = value (string) -- 0 is ignored

>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 --

Yes, that is a good ideah too. In fact I hope that this syntax
is implemented before subscripting functions. However I don't
think this is a complete workaround for subsciption. The point
of which is to throw out anything that you don't need. While I'm
on the subject here's some more subscription ideas I would like:

object x
x = {{1,2},{3,4},{5,6}}
? x [1..3][2] -- HERE'S THE TRICK
-- output: {2,4,6}

object x
x = {9,8,7,6}
? x [1,3]
-- output: {9,7}

Of course I would like these to work in combination and on
functions as well. I know it's asking a lot but it makes
sense to me.

>There seem to be mixed feelings about indexing a function...

Yes

>(which I feel is a bit hard to follow as far as readability,

No (IMO)

later,
Lewis Townsend

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu