[erlang-questions] Maps

Richard A. O'Keefe ok@REDACTED
Tue May 14 05:43:03 CEST 2013


On 13/05/2013, at 11:43 PM, Loïc Hoguin wrote:

> On 05/13/2013 07:26 AM, Richard A. O'Keefe wrote:
>> 
>> On 11/05/2013, at 2:34 AM, Loïc Hoguin wrote:
>>> Not dismissing it here, I'd be happy to have both, but maps are solving a problem (dict manipulation is incredibly tedious and time consuming in Erlang) while frames simply improve what we already have.
>> 
>> There is another EEP that I haven't finished trying to set up a *general*
>> solution for the "deep updates" problem.  It really isn't a data structure
>> issue.
> 
> Don't forget the "deep access" possible not only in expressions but also in function clauses. You'd only be solving half the problem otherwise.

I was talking about deep *update*, not deep *access*.
> 
> 
> To be perfectly honest I don't think that for most record uses this is going to be much of a problem. There's plenty of #state{} records in user applications that aren't accessed enough to make this significant.
> 
> And if you wait 10 years, any performance difference will be insignificant...

The frames proposal has been around for 10 years already.
If I wait 10 years, it is quite likely that nothing will happen.

Machines are not getting faster these days, so I'm not sure why
waiting would make the performance difference insignificant.

>> I would agree for key/value structures, but I fear that by including lists and non key/value tuples you're going to make this much too complex.

Single mechanism.  ONE thing to understand.
Proven technology: people using other languages with this approach
don't seem to have any problem.




More information about the erlang-questions mailing list