The stupid question is the question not asked | |
PerlMonks |
Re^4: What are the drawbacks of autobox?by punkish (Priest) |
on Mar 01, 2010 at 03:21 UTC ( [id://825820]=note: print w/replies, xml ) | Need Help?? |
I don't know of any language where the car->get's into->the man or the queue->joins->the boy are valid. Syntactically or semantically. So, this is an interesting thing I learned a while back, when trying to understand OO. While in English, the verb comes first followed by the subject, it is actually quite the opposite in other languages. For example, in English, we say lift chair, while in Hindi, I would say कुर्सी उठाअो. It is actually quite natural in other languages to first establish what we are referring to, and then specify what we are going to do to it. Not unlike how, say, copying or moving a file works in a Mac (or any graphic user interface). We first select the file with the mouse, and once the file is selected, we copy, move, delete or duplicate it, unlike a terminal command where we type 'copy file <target' or 'delete file'. Now, on to another topic... does being able to cascade methods help in programming? I don't know. I had been doing stuff like (fake example ahead) left(uc(substr($string, 0, length($string) - 4)),1) until I discovered JavaScript (Note: I particularly enjoy method chaining in jQuery) where I could do string.substr(0, string.length - 4).upper.left(1) In the former, I have to start in the very inside and work my way to the outside, while in the latter, I just move from left to right, applying methods as I go along. I think there is value in autobox. I too would like to explore, like Lanx, what that value is, and what its costs are.
--
when small people start casting long shadows, it is time to go to bed
In Section
Seekers of Perl Wisdom
|
|