> 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?

> 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.

> We have Product domain, but it is limited to two fields
> names of accessors are fixed and it can not use dot notation.
> We could modify Product to allow dot notation, but the fixed
> field names are hard to avoid.

Product is a mathematical concept, Pair is just a data structure.
Like I said in previous paragraph, if there's no performance
issues, abstract Record of two into a new domain Pair is worth
doing it.

Currently using Record is awkward, you have to manually
specify full types to constrcut it:
    [1,"1"]::Record(key:INT,entry:String),
if using Pair, one can write
    pair(1,"1").

Even C++17 dones't need to write type at all:

auto p1 = pair(1,"1");

-- 
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