Article View: comp.arch
Article #11340Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
From: Thomas M. Breuel
Date: Fri, 20 Nov 1992 21:37
Date: Fri, 20 Nov 1992 21:37
50 lines
3182 bytes
3182 bytes
In article <1992Nov19.105510.563@uklirb.informatik.uni-kl.de> kirchner@uklira.informatik.uni-kl.de (Reinhard Kirchner) writes:
From article <TMB.92Nov17223828@arolla.idiap.ch>, by tmb@arolla.idiap.ch (Thomas M. Breuel):
> On the other hand, please do spare the rest of us
> complex syntactic extensions ("!<>", "?)~", etc.) for all those
> special purpose features.
So Thomas wants us to write big numerical software in "assembler", or
what else are these library calls ?
One of the main differences between assembler and high-level languages
is the ability to compose functions, or, in different words, not to
have to worry about where to store intermediate results. Whether a
language has infix operators or not is a trivial feature in
comparison.
In fact, there are assembly language with infix operators, while a lot
of numerical software has been written in languages (Lisp/Scheme)
without any infix operators. Writing numerical software in Lisp/Scheme
is certainly a whole lot more convenient than writing it in assembly
language or even FORTRAN or C (both of which do have infix syntax).
The syntax extensions for rounding control are quite simple, a > or < behind
the op, e.g. +>, -<, *< etc.
You are missing the point. In my experience, new operators make
program analysis and maintenance harder. A rarely used feature like
"x+>y" is much easier to read and recognized if written as
"add_rounding_down(x,y)" than as "+>" (in fact, what is "+>" actually
supposed to mean?). Another problem is that "+>" (whatever it may
mean) is not available on a lot of hardware, and
implementation-specific features should probably always go into
libraries.
I don't need per-instruction control over rounding mode frequently,
and I think that is true for most other users. Hence, I would oppose
the addition of special syntax for it to any language I'm using. You
are, of course, welcome to disagree.
The problem is much more difficult with operations which give two results,
like additions generating a carry. But these may really be hidden in
some higher operations.
In my opinion, returning multiple values is a feature that is useful
enough to enough people to warrant better language support. Note that
in FORTRAN, this is altogether impossible, while in C, you can
"simulate" it using structures. SML and CommonLisp support it
directly.
Thomas.
Technical Details
Message-ID:
<TMB.92Nov20133736@arolla.idiap.ch>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmbReferences:
<TMB.92Nov17223828@arolla.idiap.ch> <1992Nov19.105510.563@uklirb.informatik.uni-kl.de>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!charnel!sifon!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb From: tmb@arolla.idiap.ch (Thomas M. Breuel) Newsgroups: comp.arch,comp.lang.misc Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms) Message-ID: <TMB.92Nov20133736@arolla.idiap.ch> Date: 20 Nov 92 21:37:36 GMT References: <TMB.92Nov17223828@arolla.idiap.ch> <1992Nov19.105510.563@uklirb.informatik.uni-kl.de> Reply-To: tmb@idiap.ch Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle Perceptive) Lines: 50 NNTP-Posting-Host: arolla.idiap.ch In-reply-to: kirchner@uklira.informatik.uni-kl.de's message of Thu, 19 Nov 1992 10:55:10 GMT