🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #10864

Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)

#10864
From: Damon
Date: Sun, 15 Nov 1992 23:18
38 lines
2345 bytes
In article <BxpprG.HKu@mentor.cc.purdue.edu> hrubin@mentor.cc.purdue.edu (Herman Rubin) writes:
>And how would you handle cases where operations have multiple results,
>of different types?  This should have been in all programming languages
>on day 2, and is now only clumsily handled in some.  How would you 
>handle simple operators which those who produced the languages either
>did not understand, did not think important, or just plain ignored?	

In Pascal, or some similar language where everything is built into the
language, like the exact read and write syntax and semantics, you would
have to add all these special cases for special machines and bloat the
language.  Therefore, to avoid inventing PL/1 all over again, they
shouldn't be put in at all.  (To avoid penalising evry implementation,
just like CISC.)

Or you put these features in the library.  (Just like RISC.)

Which is what C does.

I think even C is starting to bloat, but it is still quite honest in
relegating special features---that won't be used/available on *nearly
every* machine or in *a lot* of code---to the libraries.

So, returning multiple answers in C is easy if ugly.  Use pointer
arguments, or return a structure or point to one.  It needn't be
expensive at run time.

Of course, ML's pattern matching is nice...

let val (x:int, y:string) = (mystery_function(args)):t1 ... t3 -> (int*string)

...which is maybe what you are after.

Damon
-- 
Damon Hart-Davis                          Internet: dhd@exnet.co.uk, d@hd.org

Public-access UNIX (Suns), news and mail for UK#5 per month.  FIRST MONTH FREE.
[1.35] Cheap Sun eqpt.  UUCP news/mail feeds.  Tel/Fax: +44 81 755 0077.
Technical Details
Message-ID: <Bxs63J.BxA@exnet.co.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!convex!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!pipex!ibmpcug!exnet!dhd
References: <BxoEGs.Ky8@rice.edu> <1992Nov14.022705.15675@sal.wisc.edu> <BxpprG.HKu@mentor.cc.purdue.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.arch,comp.lang.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!convex!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!pipex!ibmpcug!exnet!dhd
From: dhd@exnet.co.uk (Damon)
Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
Message-ID: <Bxs63J.BxA@exnet.co.uk>
Organization: ExNet Systems Ltd Public Access News, London, UK
References: <BxoEGs.Ky8@rice.edu> <1992Nov14.022705.15675@sal.wisc.edu> <BxpprG.HKu@mentor.cc.purdue.edu>
Date: Sun, 15 Nov 1992 23:18:54 GMT
Lines: 38