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

Re: Vectors as functions

At Fri, 15 Aug 2003 01:36:53 -0400 (EDT), mike@newhall.net wrote:
> > 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.
>     I guess I don't belong on this list then?  I think you are overlooking
> the perspective that ultimately, theoretical can be very practical. 
> For example, there is a school of thought that orthogonal systems are
> more flexible and useful than non-orthogonal systems (Scheme versus
> Java or C++, for example).  If true I think it is useful and relevant
> to pursue such questions.

Of course. Sheesh. I'm not an ivory tower academic for nothing.

> > 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.
>     I think I need some elaboration of your point here: doesn't the
> special syntax provide that lack of confusion?  Are you talking about
> the syntax as an aid to the language in addition to the programmer?

No, it's not *just* the syntax is what I said. You need the values to
be different. If I had a special syntax for mutating vectors and a
special syntax for extracting the elemnts, but they were merely
"syntactic sugar" for function applications, I wouldn't really get much
benefit out of that. Sure, I'd get some (I could make my intentions
clear to other people who were reading the code) but it wouldn't be as
useful as if the vectors actually were not functions.