🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #1650

Re: How to make a language downward-extensible?

#1650
From: David Keppel
Date: Wed, 03 Oct 1990 00:40
31 lines
1619 bytes
>brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:
>>[A mess, like the #ifdef situation; see quickpick example.]

In article <7976@scolex.sco.COM> seanf (Sean Fagan) writes:
>[You want a generic algorithm description and a better replacement,
> and have the compiler automagically select the implementation?]
>[I think there's been some success in that area.]

I can immagine two cases:

* Anything on the list of approved alternatives is a valid
  substitution.  You write `binsearch (...)' and the compiler
  uses

	rule-based description
	quicksort
	any other magic way

  (provided it has the right type signature).  Selection is
  done based on the name of the operation invoked (e.g.,
  `binsearch').

* The compiler is supposed to pattern match an algorithm and
  select a replacement from a list.

The first is easy.  The second is hard.

	;-D on  ( Leftward extensible political compilers )  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo
Technical Details
Message-ID: <13224@june.cs.washington.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!mit-eddie!uw-beaver!uw-june!pardo
References: <7935@scolex.sco.COM> <29047:Sep2816:51:1290@kramden.acf.nyu.edu> <7950@scolex.sco.COM> <18718:Oct120:03:0090@kramden.acf.nyu.edu> <7976@scolex.sco.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!mit-eddie!uw-beaver!uw-june!pardo
From: pardo@cs.washington.edu (David Keppel)
Newsgroups: comp.lang.misc
Subject: Re: How to make a language downward-extensible?
Message-ID: <13224@june.cs.washington.edu>
Date: 3 Oct 90 00:40:05 GMT
References: <7935@scolex.sco.COM> <29047:Sep2816:51:1290@kramden.acf.nyu.edu> <7950@scolex.sco.COM> <18718:Oct120:03:0090@kramden.acf.nyu.edu> <7976@scolex.sco.COM>
Reply-To: pardo@june.cs.washington.edu (David Keppel)
Organization: University of Washington, Computer Science, Seattle
Lines: 31