Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Some Insights from a Traveler Between Languages

by Joost (Canon)
on Apr 23, 2005 at 22:56 UTC ( [id://450841]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Some Insights from a Traveler Between Languages
in thread Some Insights from a Traveler Between Languages

I was actually having something a bit broader than C++ virtual methods in mind. Sorry about the fuzzyness. What I was thinking about is that in OO programming, you can use the same method name in multiple unrelated classes that might or might not be involved in polymorphism.

Now, in C++ you still need some kind of type specification for variables, but for Perl or Ruby (or even Java, if you don't mind a lot of introspection) you don't have to, which implies that the actual meaning of the "word" (method name) is entirely dependent on the context. You don't even need OO to achieve this: importing a method from another namespace, or including C header files basically boils down to the same thing.

Sure it can cause confusion, but can we actually do any better? Human language really is much more adept at disambuigating short words that might have multiple meanings vs reading reallyLongDescriptiveOnesThatGetIncrediblyDifficultToTypeRightAllTheTime. :-)

  • Comment on Re^5: Some Insights from a Traveler Between Languages

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 02:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found