Article:
 |
|
Exploring E4X with Ruby
|
| Subject: |
|
Nice Idea |
| Date: |
|
2004-10-15 21:36:12 |
| From: |
|
HotFusionMan
|
Response to: Nice Idea
|
|
And many thanks to you for the code and article!
The dash-in-name remark reminds me of something -- I think the same issue arises in the cLabs Internet Explorer Controller (mentioned in one of the files in its distribution if I remember correctly, not directly on its Web pages).
At least for this case, if the Ruby interpreter required whitespace around the "-" method in calls, that might disambiguate this type of name from the minus operator/method. But I guess that would break the (admittedly rarely seen) syntax foo.-bar or foo.-(bar).
|
Showing messages 1 through 1 of 1.
My guess is that outside of a string literal it would be difficult to get Ruby to look at any operator symbol as anything other than just the operator.
I haven't tried something like this though: foo."-bar"
I'd try it out but I need some sleep.
I actually talked with the guys that did the E4X work in Javascript. They did a LOT of work in the tokenizer and lexical analyzer to support the entire XML standard in Javascript.