Euphoria implementation
- Posted by Shawn Pringle <pringle at techie.com> Mar 17, 2002
- 358 views
There has been talk of changing Euphoria. For me it is better to make functions cheaper or at least less time consuming ot execute if possible because it means that less programmers will hvae to inline things and forgo using functions in many places. In the Performance documentation it says: It is cheaper to copy to a temporary modify the temporary and then assign the temporary variable back to the original. See the part on indexing. It goes on to say that the line xi = x[i] "only copies the pointer..." Inspite of xi being modified later Euphoria doesn't make another copy of xi which is good as in this case x[i] will be reassigned xi. I think it is a natural extension of this idea to have statements like this: "n = foo(n)" pass by reference. As it makes no difference to the functionality of the program. Ofcourse things like "x = foo(n)" would be pass by value as it is now. The benifit is that many programs would get faster for nothing. Regards, Shawn Pringle