Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^3: What are the drawbacks of autobox?
in thread What are the drawbacks of autobox?

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

Replies are listed 'Best First'.
Re^5: What are the drawbacks of autobox?
by BrowserUk (Patriarch) on Mar 01, 2010 at 13:05 UTC
    I think there is value in autobox. I too would like to explore, like Lanx, ..., and what its costs are.

    My inquiry of LanX in no way prevents you (or others) continuing that discussion in the main thread.

    what that value is

    For me, that was the more interesting discussion. And I've yet to see any such value. That doesn't stop you finding value, but it stops me from giving it any further consideration.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://825820]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found