[rust-dev] 2 possible simplifications: reverse application, records as arguments

David Rajchenbach-Teller dteller at mozilla.com
Sat Apr 14 03:10:21 PDT 2012

On 4/14/12 8:07 AM, Kobi Lurie wrote:
> such a flurry of activity here :-D
> I saw a few things I liked, in the felix language (and some that are
> above my head for now.)
> Do you think they fit rust well or not?
> one is reverse application.
> it's actually logical and might simplify things.
> (similar to extension methods in c#)
> there are no classes, but a syntax like: obj.method(b,c) still exists.
> from what I could tell, the function is really method(obj,b,c), and the
> previous syntax gets translated to it. which is just nicer for the
> programmers, minimizing parentheses.

Looks like a nasty case of overloading of |method|, though :/

> another thing is that instead of passing arguments, you pass just one
> (anonymous) record. the record is the arguments.
> which means, that argument names become mandatory, and the order
> wouldn't matter.
> or alternatively, a tuple, and then names don't matter. (personally I
> prefer the record with explicit names)
> from the calling side it looks the same.

I personally like a lot the idea of being able to label arguments.

> actually there is a third one, virtual sequences, as I saw in the factor
> programming language (which is a really cool language btw, very nicely
> done)
> http://docs.factorcode.org/content/article-virtual-sequences.html

Not sure I understand. Is that a variant on enumerations or streams?


David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.mozilla.org/pipermail/rust-dev/attachments/20120414/1b6d70dc/attachment.bin>

More information about the Rust-dev mailing list