On 8 Mar 2005 23:08:10 GMT,
ro******@ibd.nrc-cnrc.gc.ca (Walter
Roberson) wrote:
<snip>
If you are trying to find a language that says, "It's okay to
redefine the system library routines," then the only one I can think
of at the moment is Forth. LISP and Scheme too maybe.
Actually in Forth everything is a 'word' (dictionary entry) including
things that other languages (including C) consider 'primitive' like
add, dereference, IF-ELSE, etc., and you can redefine any word.
Similarly in LISP everything except for a few syntactic forms, and
AIUI in Scheme everything period, is just a named function, and (all
such) can be redefined.
Fortran allows you to (re)use the names of 'intrinsic' (library)
routines for your own subprograms if you explicitly declare them
EXTERNAL as opposed to INTRINSIC, and PL/I similarly if you declare
them ENTRY rather than BUILTIN, but this can not affect things like +
and DO. Fortran>=90, like C++, allows you to overload for user-defined
types the builtin computational operators and assignment (which unlike
C++ is not just an operator) but you cannot override the standard
meanings for builtin/basic types. F9X also allows you to create
entirely new operators, which you must of course define for all cases
(types) you want to handle.
Ada has hierarchical namespaces and you can use in your own
namespace(s) the same names that the standard routines use in the
standard namespaces, but this does not replace or even completely hide
the standard ones.
- David.Thompson1 at worldnet.att.net