1. Re: we need official libs : Swap

Roderick Jackson wrote:

> But let me ask... does this situation actually
> cause trouble for you, or would this new construct
> just be a nice convenience?

Yes, it actually causes trouble. Having to write lines like this:

   draw_line( color, pt1[1], pt1[2], pt2[1], pt2[2] )

actually does cause problems, since it had errors in it the first time I
wrote it. The code is hard to read, and prone to errors, and difficult to
debug. Another real disadvantage of having data in sequences is you can't
query it in the trace screen.

I can't buy the argument that:

   { a, b } = foo()

is somehow 'un-Euphoric' because the number or type can't be determined
until run time ignores precedent. Despite arguments to the contrary,
Euphoria actually lets quite a lot of things go until run-time. For example,
many languages (like C) require that functions only return values of a given
type. Euphoria's gets() function actually returns two different types of
data - a sequence, or an integer. Other languages (like QBasic) commonly
guarantee that a function will return a value; Euphoria can't make that
determination until run time.

The 'for' loop was missing from Euphoria for some time, because Robert
considered it syntactic sugar. This is too spartan for my taste. Besides,
Euphoria already supports a mechanism to return an arbitrary number of
argument from a function. It seems to me there should be a reciprocal
mechanism to recieve them.

-- David Cuny

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu