I think you meant z = x y, Owen.

In the TUTOR language of the PLATO computer-based education system
(see links on my home page, http://www4.ncsu.edu/~basherwo), I
implemented a function called "compute" for evaluating algebraic
student input in which xy (or x y) was treated as x*y. The method
relied on the fact that in typical algebraic usage in educational
settings variables have short names. The symbol-table lookup searched
for the longest name, so that if x, y, and xy were all defined "xy"
was taken to mean a reference to the variable xy. But if only x and y
were defined, "xy" was taken to mean x*y.

However, for clarity and lack of ambiguity ordinary calculations in
the TUTOR language did not permit implied multiplication. If you meant
x*y you had to express it as x*y.

Another interesting aspect of the compute function was that it
compiled the expression to machine code and stored this code in a
buffer where it could be reused, thereby permitting fast looping
execution of user-input statements.

Bruce

On Sun, Apr 1, 2012 at 12:02 AM, Owen Densmore <[email protected]> wrote:
> Bjarne Stroustrup, creator of C++, posed this interesting use of
> overloading:
>
> http://www2.research.att.com/~bs/whitespace98.pdf
>
>
> The idea was somewhat forced upon him by ATT Labs mathematicians and
> physicists who wanted:
>
> int x,y,z;
> z=xy
>
> to function as in standard math notation as set z to x times y.
>
> I believe the notion failed to achieve popularity due to lexical scoping of
> the language, where variables might lie in entirely different bodies of
> source code.  Closures were, of course considered as a way to define the
> allowed scope for variables, but C++ had not implemented them.
>
>    -- Owen
>
>
>
>
> ============================================================
> FRIAM Applied Complexity Group listserv
> Meets Fridays 9a-11:30 at cafe at St. John's College
> lectures, archives, unsubscribe, maps at http://www.friam.org

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
lectures, archives, unsubscribe, maps at http://www.friam.org

Reply via email to