Related articles |
---|
[19 earlier articles] |
Re: Definable operators dlester@cs.man.ac.uk (1997-04-16) |
Re: Definable operators fanf@lspace.org (Tony Finch) (1997-04-18) |
Re: Definable operators monnier+/news/comp/compilers@tequila.cs.yale.edu (Stefan Monnier) (1997-04-18) |
Re: Definable operators burley@tweedledumb.cygnus.com (Craig Burley) (1997-04-18) |
Re: Definable operators apardon@rc4.vub.ac.be (1997-04-20) |
Re: Definable operators genew@vip.net (1997-04-20) |
Re: Definable operators kumo@intercenter.net (David Rush) (1997-04-20) |
Re: Definable operators burley@tweedledumb.cygnus.com (Craig Burley) (1997-04-22) |
Re: Definable operators burley@tweedledumb.cygnus.com (Craig Burley) (1997-04-30) |
Re: Definable operators hrubin@stat.purdue.edu (1997-04-30) |
Re: Definable operators apardon@rc4.vub.ac.be (1997-05-04) |
Re: Definable operators Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-05-04) |
Re: Definable operators ephram@ear.Psych.Berkeley.EDU (Ephram Cohen) (1997-05-06) |
[13 later articles] |
From: | David Rush <kumo@intercenter.net> |
Newsgroups: | comp.compilers,comp.lang.misc,comp.lang.functional |
Date: | 20 Apr 1997 12:15:44 -0400 |
Organization: | Not Very |
References: | 97-03-037 97-03-076 97-03-112 97-03-115 97-03-141 97-03-162 97-03-184 97-04-027 |
Keywords: | syntax, design |
Craig Burley <burley@gnu.ai.mit.edu> writes amidst snipping and maiming:
> It's not clear to everyone what it means. Why wouldn't
> "1" + "2"
> evaluate to
> "3"
> for example?
>
> The concept of + always meaning the mathematical sense of addition is
> useful -- not just in the sense that "addition is useful", but that "+
> means _only_ addition" is useful in designing programming languages.
> In point of fact, "+ means _only_ addition" is _substantially_ more
> useful as a language feature than "+ means whatever the programmer
> wants it to mean".
How about "+" meaning the mathematical "+" defining a (semi?) group?
For "+" as string concatenation, that almost makes sense, although I
will admit that coming up with an inverse under "+" for string
concatenation is rather difficult.
Actually, under those constraints, the quasi-numerical implementation
of strings makes a lot of sense...
I don't know if I'm agreeing or disagreeing, here. But I think that
"+" denotes a behavior that "makes sense" only in relationship to
other behaviors applicable to a given type. I geuss I come in with a
little weaker constraint than Craig, but in basic agreement.
happy hackin'
david rush
mailto:kumo@intercenter.net
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.