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

Re: Vectors as functions

    Then again, what's so special about vectors that they deserve a
different syntax?  Given a language without built-in vectors, one can
easily implement (given decent primitives like CONS cells) simple
vector-like objects as well as more complex storage entities like
associative arrays or even databases.  Since most languages don't
allow one to invent arbitrary syntax, you would be left with two or
more conceptually related types, one of which gets special syntax
because it happens to be built in to the language, the others settling
for ordinary syntax, which according to this thread is bug-prone
because of the mutable symantics.

    The other possibility is a language with the syntactic flexibility to
allow one to grant programmer-created objects their own special
syntax.  But in such a language one could put the same syntactic
wrapper on a built-in vector type with an underlying syntax that is

    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.

> People, people -- they're being *sarcastic*.
> (At least, I hope to heaven you are, Prof. Findler.)
> Shriram
> Pascal Costanza wrote:
>> In general, I think one shouldn't unify things that are strongly
>> different.
>> Pascal