Re: Euphoria features

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

Jason Gade writes:
> I am even thinking (though not convinced) that functions
> and procedures should *always* take one parameter, and
> that '&' should replace ',' as a parameter separator.

You might be interested to know that for the first few months
of Euphoria's existence, functions and procedures *did*
only take one parameter. (I was *really* minimalist back then
...long before you guys corrupted me).

Instead of passing multiple arguments as:
          foo(a, b, c)

You had to do it as:
          foo({a,b,c})

procedure foo(object x) referenced its parameters using
subscripts as x[1], x[2], and x[3].

Eventually I broke down and allowed multiple named parameters.
The readability of:

     procedure foo(object apples, object oranges, object bananas)

is much better than:

     procedure foo(object x)
         object apples, oranges, bananas
         apples = x[1]
         oranges = x[2]
         bananas = x[3]
         ...

and it eliminates the overhead of {,,} before the call,
and three subscript operations inside the routine.

(Back then "object" was the *only* type,
for-loops didn't exist, ... the good old days!)

Regards,
     Rob Craig
     Rapid Deployment Software
     http://www.RapidEuphoria.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu