Article View: comp.lang.misc
Article #91Re: Modula-3, Fortran, Numbers & Aliens
From: Raul Deluth Miller-Rockwell
Date: Tue, 07 Apr 1992 04:36
Date: Tue, 07 Apr 1992 04:36
67 lines
3242 bytes
3242 bytes
Raul Deluth Miller-Rockwell:
> |> [...]
> |> The lifetime of a definition created by name=.expr is similar to a
> |> '=:' definition, but the definition is additionally tied to the
> |> explicitly defined routine in which it appears. [...]
> |>
> |> [...]
> |> Have I left any situation uncovered?
Jim Giles:
> Yes. You have yet to present _how_ explicitly defined routines are
> delimited and named.
Explicitly defined routines are declared with either
> string1 : string2
or
> string : n
In the first form, string1 is the text used for the monadic case of
the definition, and string2 is the text used for the dyadic case. If
the string is empty, that part of the definition is also empty -- in
other words, it has no domain, and can not be applied to any data.
In the second form, n is a small cardinal number, and the definition
has special properties which I've not addressed.
Naming uses either =. or =:
For example,
invalid=. '':''
defines an empty function with no domain. This might be useful for
informing a compiler that some particular circumstance should not
occur.
> You have yet to present whether such definitions may be nested.
Yes, of course. I've not needed to use this feature, but then I
hardly ever use explicit definitions.
> You have yet to explain why you think the ability to redefine
> globals is desirable (I don't think it is).
Well, I rarely use redefinition of any sort. However, such globals
are useful when building caching mechanisms, in debugging tools, and
when I'm doing exploratory work and trying to get a feel for the
problem domain.
And, in anticipation of what I think your next objection will be, yes,
if the programmer defines functions on the fly (where the compiler can
not anticipate what the definition will be), there will be a
performance cost. This is analogous to invoking a compiler under
program control.
Also, in case you've followed my discussion of the rank of verbs, ':'
is a conjunction (a functional form) and thus can not have a rank in
and of itself. However, if it creates a verb, then that verb may be
given a rank.
And yes, I'll agree that this is different from the way Fortran does
things. I'll also agree that anything you can do with ':' you can, in
principle, achieve with Fortran. But the Fortran implementation will
be considerably more complex, and many of the details will be specific
to the operating system under which Fortran is running.
--
Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
Technical Details
Message-ID:
<ROCKWELL.92Apr6233655@socrates.umd.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwellReferences:
<1992Mar15.221628.24491@yrloc.ipsa.reuter.COM> <ks8boqINN8ht@network.ucsd.edu> <ROCKWELL.92Apr5115242@socrates.umd.edu> <1992Apr6.193950.5862@newshost.lanl.gov>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!socrates!socrates!rockwell From: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Subject: Re: Modula-3, Fortran, Numbers & Aliens In-Reply-To: jlg@cochiti.lanl.gov's message of 6 Apr 92 19:39:50 GMT Message-ID: <ROCKWELL.92Apr6233655@socrates.umd.edu> Sender: rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) Organization: Traveller References: <1992Mar15.221628.24491@yrloc.ipsa.reuter.COM> <ks8boqINN8ht@network.ucsd.edu> <ROCKWELL.92Apr5115242@socrates.umd.edu> <1992Apr6.193950.5862@newshost.lanl.gov> Date: Tue, 7 Apr 1992 04:36:55 GMT