Ok perhaps that's a bit of speculation there on my part. ;) My logic is based upon that the more concise/expressive you can be, the better the compiler can infer intent and optimize accordingly. For instance, it occurs to me that operator overloading would never need to go through vtable lookups... but I could be wrong.
/Casper On 13 Aug., 14:01, Jess Holle <[email protected]> wrote: > I've certainly used operator overloading myself for graphics matrix math. > > That said, I don't see how it "speeds up execution". It just reduces > > vector2 = matrix.multiply( vector1 ); > > to > > vector2 = matrix * vector1; > > Nice example of clear and concise (and appropriate) use of operator > overloading -- but not of execution speed improvement. > > -- > Jess Holle > > Casper Bang wrote: > > With all due respect, operator overloading in Fan is an entirely > > different, much less scary beast than the infamous C++ implementation > > which everyone seems to have in mind. I'm not much for guns, but to > > continue gun metaphor: Python and C# both demonstrates that this is > > not necessarily an exploding Uzi. But if your premise is that > > programmers will do bad things when given the slightest chance, then > > remember that you don't actually need a gun to kill somebody - it just > > gets the job done easier and faster. > > > Btw. just yesterday I witnessed an example of how operator overloading > > simplifies code and speeds up execution: > >http://blog.joa-ebert.com/2009/08/10/flirting-with-silverlight/ > > > /Casper > > > On 13 Aug., 13:20, Ben Schulz <[email protected]> wrote: > > >>> So operator overloading is bad because people have HR problems? > > >> Why stop at operator overloading? To hell with all safe guards.. No > >> more speed limits or safty belts; let's everyone just drive > >> reasonably. And what's with architects and statics? It'll hold. > > >>> Don't blame the gun, blame the shooter. > > >> Yes, because *that's* how you bring people back from the dead. > > >> With kind regards > >> Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
