Why did Groovy drop tuples?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Why did Groovy drop tuples?

pekingduck
Hi
Sorry if this is not the right place for this post--it's not about Groovy's syntax.

Never, in my 20 years of programming life, have I fallen in /love/ with a language as I have with Groovy--and I have used Pascal, BASIC, C, assembler, Java and Python (Python was the closest to what I feel about Groovy, but then, no closures...!)

I was reading James Strachan's blog, announcing the release of Groovy (Friday, August 29, 2003) (http://radio.weblogs.com/0112098/2003/08/29.html). At the end, the posting says that "We're starting simple with the nice tuples, sequences, maps from python & closures from ruby..." I thought Python's tuples were cool, facilitating such stuff as returning multiple values from a function, and multiple simultaneous assignments:

a,b,c = parseRoots()
a,b,c, = 1,2,3

Why were tuples dropped from Groovy?

TIA

pd


Reply | Threaded
Open this post in threaded view
|

Re: Why did Groovy drop tuples?

cupdike
pekingduck wrote
Hi
Sorry if this is not the right place for this post--it's not about Groovy's syntax.

Never, in my 20 years of programming life, have I fallen in /love/ with a language as I have with Groovy--and I have used Pascal, BASIC, C, assembler, Java and Python (Python was the closest to what I feel about Groovy, but then, no closures...!)

I was reading James Strachan's blog, announcing the release of Groovy (Friday, August 29, 2003) (http://radio.weblogs.com/0112098/2003/08/29.html). At the end, the posting says that "We're starting simple with the nice tuples, sequences, maps from python & closures from ruby..." I thought Python's tuples were cool, facilitating such stuff as returning multiple values from a function, and multiple simultaneous assignments:

a,b,c = parseRoots()
a,b,c, = 1,2,3

Why were tuples dropped from Groovy?

TIA
pd
There's no reason you couldn't use a list for the above example.  What you're really talking about is multiple assignment which looks like it is slated for an upcoming release:

Multiple Assignment Proposal
JIRA Request for Multiple Assignment
Groovy Roadmap

The more typical reason to use tuples is as read-only structure (database record) and for better performance IIRC.

-Clark