| Article: |
Technologies to Watch: A Look at Four That May Challenge Javas Development Dominance | |
| Subject: | Seaside link | |
| Date: | 2005-10-20 13:16:56 | |
| From: | ikayak | |
|
Response to: Seaside link
|
||
|
Which part? The 10.times? Seems like English to me...
|
||
Showing messages 1 through 2 of 2.
-
Not maintainable or english
2005-10-20 16:40:58 kgelner [Reply | View]
I didn't much care for the parallel assignement either, all fun and games until you accidentially delete something from one side and then have to remember the order they were in (or worse yet accidentally put it back wrong).
Also, how can you claim that line is english? People do not talk like:
I'll put the ketchup, car keys in the fridge, drawer.
Although really in Ruby would it not be more like:
In the fridge, drawer I'll put the ketchup, car keys.
It is consise, but claiming it reads like english is a stretch.
It's not having Java on the brain to dislike a feature like this, it can also be from seeing years of the kinds of mistakes that syntactic shortcuts can cause. I like some of them but they have to be used with care.




Well, the puts part for one. It's like grammar erroring: 'I writes well in English' for one. If it's going to flow like readable English, couldn't it have been closer to grammatically correct.
Second, Java on the brains of code monkey everywhere or not, did it have to have a highly unfortunate overlap with the put and get collection methods of map collections.
Thirdly, ok, it's a convention, I get that. And I'm not saying that I love typing out System.out.println or writeBytesToFile() or suchlike, but it ought to be pointed out that when I write something like one of the above that it's clear what happened. i.e. I wrote bytes to a file. Puts is vague. Put to which output stream, to file, as bytes or chars or unicode, etc. Obviously one becomes familiar with the Ruby conventions quickly, but then again, one becomes familiar with the Perl conventions disturbingly quickly as well in some cases, and Perl's love of shorthand conventions is not exactly endearing to the literate programming movement.
10.times is elegant though, I'll give you that. I'd love to see a response to another poster's question of how you hop a 10.times Ruby loop 'for loop i += 2' style, btw, but the partial innovation of first-class ranges is interesting.