I guess the analog for this in traditional JS 'Object' instances is
that when you use the [] operator, i.e. obj[valueObject], it actually
does obj[valueObject.toString()], so you can control the 'hashing
function' in a sense by overriding toString. It seems natural to want
something equivalent
On Sunday, April 6, 2014, K. Gadd k...@luminance.org wrote:
I guess the analog for this in traditional JS 'Object' instances is
that when you use the [] operator, i.e. obj[valueObject], it actually
does obj[valueObject.toString()], so you can control the 'hashing
function' in a sense by
An there is nothing stopping someone from defining their own map class
(possibly by subclassing Map) that has its own hashing and comparison policies.
JS implementations + ES6 functionality are good enough that we don't have to
wait for such things to be built-in.
Allen
On Apr 6, 2014, at
I'd like to raise an issue with ES7 value objects with maps raised here:
http://esdiscuss.org/topic/maps-with-object-keys
To save you all time, let me sum things up:
ES6 maps don't solve a particular (but common) issue for me - using
compound objects as keys. I do a lot of statistical analysis
4 matches
Mail list logo