[erlang-questions] Erlang 3000?

Zvi exta7@REDACTED
Sun Nov 16 13:33:41 CET 2008




Damien Morton-2 wrote:
> 
> As you suggest, the 'minimal' change is to wrap the current set of
> collections and create a set of behaviours to regularise naming. From this
> a
> set of library guidelines could be born to guide other efforts in other
> modules.
> 

Yes, this is what I proposed.

This is the fastest way to start prototyping new stdlib, for the begining I
propose to use new module names (i.e. for example  gc_set instead set,
gc_dict, instead dict , etc., where "gc_" perfix mean gen_collection), i.e.
to not interfere with legacy code.

I have 2 ideas here:

1. Maybe there is a reason from the beginning to have 2 collection
behaviours, like in Python:  
  a. gen_mapping (for dict, ets, dets, i.e. any key=>[value] mapping, maybe
even funs)
  b. gen_sequence (for list, tuple, array, set, ordset, etc.). In some
languages you may use index as a key - so maybe everything can be
gen_mapping?

2. Use parametrized types, to specify ADT implementation details / policies.
For example in case of distributed/SMP map/fold , using something as plists
"malt" (i.e. how to split tasks between cores/nodes or just use sequential
code - this is just example).


Zvi


Damien Morton-2 wrote:
> 
> Can a module have multiple behaviours applied to it? What happens with
> conflicts, can one function satisfy two or more behaviour requirements?
> 

I don't know
-- 
View this message in context: http://www.nabble.com/Erlang-3000--tp20518620p20524858.html
Sent from the Erlang Questions mailing list archive at Nabble.com.




More information about the erlang-questions mailing list