RCR 307: allow attributes to take arguments for assignment

E

Eric Mahurin

I just put in a RCR that allows for a little more syntax sugar.
The proposal is just to make:

object.attribute(arguments) = expression

to be equivalent to:

object.send:)attribute=,arguments,expression)

This would just be a nice-to-have RCR in my opinion as you can
use standard methods instead. But, it does seem like Rubyish
syntax. Here is the link if you are interested:

http://www.rcrchive.net/rcr/show/307




__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
 
E

ES

Le 15/5/2005 said:
I just put in a RCR that allows for a little more syntax sugar.
The proposal is just to make:

object.attribute(arguments) =3D expression

to be equivalent to:

object.send:)attribute=3D,arguments,expression)

This would just be a nice-to-have RCR in my opinion as you can
use standard methods instead. But, it does seem like Rubyish
syntax. Here is the link if you are interested:

http://www.rcrchive.net/rcr/show/307

Call me stupid, but I am afraid I do not understand what this
code would *do*. Could you clarify, maybe post an example (if
possible, with Ruby code)?

E
 
N

nobu.nokada

Hi,

At Mon, 16 May 2005 04:00:48 +0900,
Eric Mahurin wrote in [ruby-talk:142729]:
I just put in a RCR that allows for a little more syntax sugar.
The proposal is just to make:

object.attribute(arguments) = expression

to be equivalent to:

object.send:)attribute=,arguments,expression)

I'd tried it once and found it was so tough to let yacc swallow
it. But will try again later.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top