[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke
- From: Carlos Villela <cv@lixo.org>
- To: "dev@ioke.kenai.com" <dev@ioke.kenai.com>
- Subject: [ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke
- Date: Fri, 1 May 2009 00:07:03 +0100
Sorry about the top posting, I'm on the phone.
Anyway, people have been abusing hashes in Ruby and tuples in Python for a while now. What can we learn from such abuses and in which ways purer languages have fixed those problems?
I'm not trying to be cheeky, just genuinely interested in peoples differing opinions on what this functionality should actually provide, given our past experience with similar (or otherwise) tools.
- cv
On 30 Apr 2009, at 20:57, Ola Bini <ola.bini@gmail.com> wrote:
Sam Aaron wrote:
Immutability, no indexing, it's not Enumerable, its main purpose is to be destructured.
On 30 Apr 2009, at 20:35, Ola Bini <ola.bini@gmail.com> wrote:
T W wrote:
If I may point out a slippery slope, treating tuples as records orDon't agree at all. They are distinctly separate concepts - and they also have very different intent.
dicts is getting closer to having tuples follow the same rules as
passing parameters to a method. Think about it, you can't index into
your parameter list. They come through named, or, why not referenced
something like _1? The syntax is elegantly similar too.
Finally, my proposal is that Record types only have names, and Tuple types only have positions
In this case what is the distinguishing differentiator between tuples and lists, is it only immutability?
I'm waiting for someone to tell me why I'm wrong here... =)
Cheers
On Thu, Apr 30, 2009 at 12:54 AM, Ola Bini <ola.bini@gmail.com> wrote:
Martin Dobmeier wrote:
2009/4/30 Ola Bini <ola.bini@gmail.com <mailto:ola.bini@gmail.com>>The interesting thing I saw with records is that if you can destructure them
While we are at it, what about keyword tuples, or records?
x = (foo: "123", bar: "321")
x bar println
Not sure if it would be useful or not... Or if the overlap with
dicts (and other objects) is to large.
Hmm, given that Ioke won't treat tuples as containers at all and that it
even likes to discourage use of explicit indexing into a tuple by using
"ugly" syntax (hope I got you right there), the use of keyword arguments
would undermine that, wouldn't it?
Btw, just noticed your tweet about tuples. You said that one shouldn't
even be able to index into a tuple. Should I remove that completely from the
prototype?
Cheers, Martin
too, like this:
(foo: aVar, bar: anotherVar) = (bar: 123, foo: 321)
That could be pretty powerful.
--
Ola Bini (http://olabini.com) Ioke creator (http://ioke.org)
JRuby Core Developer (http://jruby.org)
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818 )
"Yields falsehood when quined" yields falsehood when quined.
--
Ola Bini (http://olabini.com) Ioke creator (http://ioke.org)
JRuby Core Developer (http://jruby.org)
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
"Yields falsehood when quined" yields falsehood when quined.
--
Ola Bini (http://olabini.com) Ioke creator (http://ioke.org)
JRuby Core Developer (http://jruby.org)
Developer, ThoughtWorks Studios (http://studios.thoughtworks.com)
Practical JRuby on Rails (http://apress.com/book/view/9781590598818)
"Yields falsehood when quined" yields falsehood when quined.
|
[ioke-dev] Re: Re: Re: Tuples for Ioke |
(continued) | |
| Ola Bini | 04/29/2009 | |
| T W | 04/29/2009 | |
| Ola Bini | 04/30/2009 | |
| Martin Dobmeier | 04/30/2009 | |
| Ola Bini | 04/30/2009 | |
| T W | 04/30/2009 | |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Ola Bini | 04/30/2009 |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Sam Aaron | 04/30/2009 |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Ola Bini | 04/30/2009 |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Sam Aaron | 04/30/2009 |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Carlos Villela | 04/30/2009 |
|
[ioke-dev] Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Tuples for Ioke |
Amanda Laucher | 04/30/2009 |
| Ola Bini | 04/30/2009 | |
| Martin Dobmeier | 04/30/2009 | |
| Martin Dobmeier | 04/29/2009 |





