Re: Overwrite functions...
Dan Shafer wrote: On Nov 19, 2005, at 8:02 AM, Richard Gaskin wrote: I was never able to turn up a practical use which could not be achieved through other means. Not only that, but in languages where operator overloading is allowed, I'm told by pros that that is one of the largest single sources of bugs in software. That was pretty much Raney's response, something along the lines of "Why slow things down just so you can shoot yourself in the foot?" :) -- Richard Gaskin Fourth World Media Corporation ___ [EMAIL PROTECTED] http://www.FourthWorld.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Overwrite functions...
On Nov 19, 2005, at 8:02 AM, Richard Gaskin wrote: I was never able to turn up a practical use which could not be achieved through other means. Not only that, but in languages where operator overloading is allowed, I'm told by pros that that is one of the largest single sources of bugs in software. ~~ Dan Shafer, Information Product Consultant and Author http://www.shafermedia.com Get my book, "Revolution: Software at the Speed of Thought" From http://www.shafermediastore.com/tech_main.html ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Overwrite functions...
Gilberto Cuba wrote: And overloading of functions??? Transcript does not support overloading of built-in commands and functions. Many years ago I went to the mat on this one with the inventor of the Rev engine, Scott Raney. His explanation was that one of the key ways the Rev engine performs many tasks about an order of magnitude faster than other xTalks is because he's very stingy with the token search space; that is, the fewer types of tokens that need to go through its internal symbol table the faster the overall exection. He took a good look at built-in commands and functions and decided they were taking up far more time than they were worth, so he designed his interpreter/compiler to forbid the practice of overriding them. I argued with him and argued with him and demanded he rethink the decision. Surely he was a madman, I thought at the time, to take such power away. He replied with his characteristic good humor and patience, and laid down the glove gently: "Find me one case where it's absolutely necessary and I'll consider it." I was never able to turn up a practical use which could not be achieved through other means. -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Overwrite functions...
And overloading of functions??? - Original Message - From: "Dan Shafer" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Friday, November 18, 2005 8:14 PM Subject: Re: Overwrite functions... Overriding built-ins is not supported in Rev as far as I know. On Nov 18, 2005, at 6:00 PM, Gilberto Cuba wrote: Hi, Exists any way of overwrite a functions that it is defined by the Engine Revolution with my function? Example, i want to run a function that i defined like "sec" and not run a function that return the seconds. function sec tValue put value( 1 / cos( tValue ) ) into tResult return tResult end sec Best regards, Gilberto Cuba ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ~~ Dan Shafer, Information Product Consultant and Author http://www.shafermedia.com Get my book, "Revolution: Software at the Speed of Thought" From http://www.shafermediastore.com/tech_main.html ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Overwrite functions...
Gilberto- Friday, November 18, 2005, 6:00:06 PM, you wrote: > Exists any way of overwrite a functions that it is defined by the > Engine Revolution with my function? > Example, i want to run a function that i defined like "sec" and > not run a function that return the seconds. > function sec tValue > put value( 1 / cos( tValue ) ) into tResult > return tResult > end sec No, unforunately there isn't. I'd love to have this ability, too, but it would complicate the compiler parser quite a bit, so I don't expect to see this in my lifetime. You'd need to define "secant" instead of "sec" in order to get past the compiler error. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Overwrite functions...
Overriding built-ins is not supported in Rev as far as I know. On Nov 18, 2005, at 6:00 PM, Gilberto Cuba wrote: Hi, Exists any way of overwrite a functions that it is defined by the Engine Revolution with my function? Example, i want to run a function that i defined like "sec" and not run a function that return the seconds. function sec tValue put value( 1 / cos( tValue ) ) into tResult return tResult end sec Best regards, Gilberto Cuba ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ~~ Dan Shafer, Information Product Consultant and Author http://www.shafermedia.com Get my book, "Revolution: Software at the Speed of Thought" From http://www.shafermediastore.com/tech_main.html ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution