[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: address@hidden*Subject*: Re: Vectors as functions*From*: Michael Vanier <address@hidden>*Date*: Thu, 14 Aug 2003 21:40:14 -0700*Cc*: address@hidden*In-reply-to*: <200308150336.h7F3aErQ208596@pimout5-ext.prodigy.net> (messagefrom Robby Findler on Thu, 14 Aug 2003 22:36:13 -0500)*References*: <20030814170153.80D4B6BEDE@laime.cs.uchicago.edu><AA236D25-CEA2-11D7-B 291-0003938EB888@web.de> <16188.3934.267729.188080@cs.brown.edu> <32783.141.154.13.159.1060907724.squirrel@stuff.hrnoc.net> <200308150336.h7F3aErQ208596@pimout5-ext.prodigy.net>*Sender*: address@hidden

Just to clarify, what exactly *are* you advocating? For me, the problem with special function-like syntax for vectors is: 1) It's ad-hoc. Could a user define this syntax him/herself? 2) I like having explicit vector-set! and vector-ref operations in case I wanted to write code that needed them. I'm thinking of a map-like construct, although that won't work for vector-set! because it's a special form, but you could do similar things with a macro. [Aside: I still don't understand why scheme has set! as a primitive special form instead of as a function whose first argument is a symbol. Ideally you'd have both, of course, but the latter seems more primitive to me. IIRC the very first version of scheme had "set" as a function.] If you keep vector-set! and vector-ref, and have a mechanism whereby users could create syntactic shortcuts as described, then I'd be all for it. IMO syntactic sugar is VERY important in certain contexts; in fact, it's way too important to be left to the discretion of language designers ;-) That's my beef against perl; it's not that all that syntax is useless, but it's not something the user can define (except maybe in perl 6, which will have everything...). Mike > From: Robby Findler <robby@cs.uchicago.edu> > Date: Thu, 14 Aug 2003 22:36:13 -0500 > > At Thu, 14 Aug 2003 20:35:24 -0400 (EDT), mike@newhall.net wrote: > > I actually do agree that the special syntax of vectors probably helps > > reduce bugs, but perhaps in a highly orthogonal language that would > > not be a fundamental property. > > One of the best things about this list is that people here realize that > such purely theoretical concerns are not the only ones that matter. > Also, it's not just the special syntax (altho it is very important) -- > it's also the fact that vectors cannot be confused for other types > (either statically or dynamically); the abstraction is unbreakable. > > Robby >

**Follow-Ups**:**Vectors like functions***From:*Bruce Lewis <brlewis@alum.mit.edu>

**Re: Vectors as functions***From:*Michael Sperber <sperber@informatik.uni-tuebingen.de>

**Re: Vectors as functions***From:*Bruce Lewis <brlewis@alum.mit.edu>

**Re: Vectors as functions***From:*Robby Findler <robby@cs.uchicago.edu>

**References**:**Re:***From:*Robby Findler <robby@cs.uchicago.edu>

**Vectors as functions***From:*Shriram Krishnamurthi <sk@cs.brown.edu>

**Re: Vectors as functions***From:*mike@newhall.net

**Re: Vectors as functions***From:*Robby Findler <robby@cs.uchicago.edu>

- Prev by Date:
**Re: Vectors as functions** - Next by Date:
**Re: Vectors as functions** - Previous by thread:
**Re: Vectors as functions** - Next by thread:
**Re: Vectors as functions** - Index(es):