Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[imp-dev] type inferring list, set, relation and map writers

Hi,

I've added IValueFactory.listWriter(), setWriter(), mapWriter, and
relationWriter(). These don't take the element types are arguments, as
the pre-existing writer constructors do.
Instead these writers will infer their element types from the values
that are written to the respective containers.

It may quite a bit faster to use these methods when you don't know the
element type of the container a priori (preventing an intermediate
data-structure to hold all elements).
It may be a bit slower if you do know the types in advance, because
the type inferring writers will do a lub() operation extra for each
inserted element.

Cheers,

Jurgen

-- 
Jurgen Vinju
- Centrum Wiskunde & Informatica - SEN1
- INRIA Lille - ATEAMS
- Universiteit van Amsterdam

  www: http://jurgen.vinju.org,
http://www.rascal-mpl.nl,http://twitter.com/jurgenvinju
skype: jurgen.vinju


Back to the top