| Article: |
Technologies to Watch: A Look at Four That May Challenge Javas Development Dominance | |
| Subject: | Not maintainable or english | |
| Date: | 2005-10-20 16:50:38 | |
| From: | ikayak | |
|
Response to: Not maintainable or english
|
||
|
10.times reads very much like English. As does print hello if not i == 10. As does has_many :cars. Ruby lets me introduce verbs.
|
||
Showing messages 1 through 3 of 3.
-
Not maintainable or english
2005-10-23 20:20:32 jimothy [Reply | View]
I'll agree with the others on the parallel assignments; this introduces a lot of confusion that could be eliminated with just an extra line of code.
The loop (10.times), however, I think is rather intuitive. I'll also note, that while you're quick to jump to its defense, nobody has complained about this loop syntax as far as I can tell. It's those darn parallel assignments that are catching flack.
-
Not maintainable or english
2005-10-21 09:11:50 greg_barton [Reply | View]
To your example, how about: use the red and yellow bowls for ketchup and mustard.
In English, strictly speaking, this is ambiguous. Can I use a yellow bowl for ketchup? Maybe. If you say, "You didn't understand..." I just come back with, "Well, you said I could use red and yellow bowls for both ketchup and mustard." You say, "I didn't mean BOTH!" And I say, "Well, why did't you say so?"
Anyway, I don't see the appeal for making a programming language more like English. English must be one of the least precise languages on the planet. That's great for rhetoric, poetry, and prose, but not for programming. I see nothing wrong with using a few more lines to get your point across as precisely as possible.




for (i=0; i<100; i+=4) {}
Not attacking; I'm honestly curious.