[M3devel] small array in modula-3?

Henning Thielemann lemming at henning-thielemann.de
Fri Nov 16 22:24:15 CET 2007


On Fri, 16 Nov 2007, Rodney M. Bates wrote:

> If you don't want to have to write the module name as a qualifier, you can
> rename a procedure too, with a constant declaration (Procedures in Modula-3
> are actually the same thing a constants of procedure type.)
>
> CONST DoSomething = M.DoSomething
> ...
> DoSomething ( v )

It would have been nice if PROCEDURE declarations would reflect this, like
in functional languages. Say

CONST
  Sin =
     PROCEDURE (x: LONGREAL;): LONGREAL
       BEGIN
         ...
         RETURN y;
       END;

This would also be the key for anonymous functions or loops as higher
order functions. Just an idea, it's certainly simpler just to use a
functional language. :-)



More information about the M3devel mailing list