On Mar 26, 2007, at 7:09 AM, Daniel Stenning wrote:
> All of this "Wrapping" into "tuple" objects - either into dictonaries,
> classes or using structs ?? Just for what might merely be the need
> to return
> two integers ?? its an awful lot of unnecessary tedious activity
> - both on
> the part of us as programmers and the CPU - for what could be a
> very simple
> requirement.
BUT all these "workarounds" mimic what is really going on in Ruby,
Python, Applescript and almost every other language that has multiple
return values
They all return tuples and they happen to have syntax that unpacks
those tuples for you so you can write
a,b,c = someFunction()
In RB because there is no such class as tuple, and no automatic way
to unpack it so you create it yourself.
There's even the start of code for a class to create a tuple in one
of the replies in this thread if you look for it.
That's software engineering.
REAL tends to focus on things that are impossible to do in RB without
REAL adding something (language, classes, etc) The things where the
workaround is "None exists"
There is already a means to return multiple values in at several ways
(byref, dictionaries, arrays or the tuple class suggested)
Submit the request or sign on to it if you want this and see where it
lands
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>