On 03/26/2017 05:35 AM, oldk1331 wrote:
>> It does not solve real problem.  Basicaly we want Record
>> to be efficient.  And Record must allow any number of
>> fields of arbitrary names.
> 
> Record of two field is represented by cons pair, right?
> Even if 'Pair' uses Record as its Rep, there's not much
> performance loss, right?

I don't understand. If I programmed a domain Pair(A, B) and made its Rep
equal to

  Record(first: A, second: B)

would the compile produce something more complicated than a cons pair
for the representation?

Is the compiler currently to weak to optimise all the unneeded stuff
away so that (in terms of speed) Pair would be actually equivalent to
Record?

>> Concerning properties of Record, this is essentially question
>> how much we want to build into compiler.
> 
> I think Record is like C's 'struct'.  We don't need much properties
> from it, we use it as building blocks.

I also think so. Record is a datastructure not an algebraic domain, so
the only things that it should export is constructor and accessor
functions. "=" is definitely not among the things that Record should export.

I think, in the long run the compiler should be better and we should
have specific domains (like Pair) that conditionally export
functionality depending on the functionality of their input types.

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to