[kepler-dev] Re: [kepler-cvs] kepler/src/org/sdm/spa ArrayToSequence.java

Stephen Andrew Neuendorffer neuendor at eecs.berkeley.edu
Tue Jul 6 12:54:08 PDT 2004


At 12:11 PM 7/6/2004, Tobin Fricke wrote:
>On Fri, 2 Jul 2004, Stephen Andrew Neuendorffer wrote:
>
> > Out of curiosity: Why do you think you need this?
> > An array in Ptolemy always has elements of the same type.
>
>Likewise, how does orb.sdm.spa.Count differ from
>ptolemy.actors.lib.Accumulator?
>
>I think the behavior that lead to org.sdm.apa.ArrayToSequence is similar
>to the problem I have with my ObjectToRecord actor (described earlier).
>It is "tempting" to circumvent the type system, but I'd rather not do
>that.

Actually it's slightly differenct.  In the case of ObjectToRecord, there is 
not enough information
in the type of the input to infer the type of the output.  We could modify 
the type system slightly
so that there was enough information to do this however.  This is a general 
problem in type systems,
however: there are inevitably cases in a rich enough language where we 
might want the type system
to know more information in the types.

Steve




More information about the Kepler-dev mailing list