[kepler-dev] Re: zero-length arrays

Shawn Bowers bowers at sdsc.edu
Thu Aug 12 07:58:43 PDT 2004

> > Isn't this last point just an implementation detail? Ultimately, a list
> > is the "abstract" data structure, and array is just a common programming
> > language implementation for a list-like structure.  The more general
> > construct is really "collection" for which bags (mult-sets), sets, and
> > lists are specific types of collections.
> That's completely true.  But the underlying implementation determines the
> efficiency of operations on the structure, and therefore the algorithms
> that you'll choose to use.

Yes, of course, and that is what is cool about Ptolemy; if you need 
another implementation the type system is there for the taking. (My 
comment above was on your suggestion to make ArrayToken the more general 

> it's possible that the right avenue IS just to create a decent set of
> built-in primitives, so that these expensive implementations are not
> necessary, and therefore avoid language creep.


> > Also, it isn't clear to me that an empty record is a useful structure,
> > whereas I definately see how an empty array (or more specifically an empty
> > list) is useful.
> That's a good point.  But I don't think we'd want to rule out empty
> records entirely... who knows when they might be useful?  (Also, the empty
> record is a good type signature of "a record of some kind.")
> But it seems that Ptolemy allows empty records: intersect({foo=0},{bar=0}) !

These aren't empty records though, right? They both have one component: 
one has foo and the other bar.  Maybe I don't understand your example. 
An empty record would be a suitable way to represent a record of unknown 
length, and components. But as a data structure, the utility seems pretty 


> Also seems like a good reason to allow empty records.
> Tobin
> _______________________________________________
> kepler-dev mailing list
> kepler-dev at ecoinformatics.org
> http://www.ecoinformatics.org/mailman/listinfo/kepler-dev

More information about the Kepler-dev mailing list