Revisiting Decimal (generic algorithms)

Brendan Eich brendan at mozilla.org
Fri Jan 16 12:15:34 PST 2009


On Jan 16, 2009, at 12:11 PM, Brendan Eich wrote:

>> This problem cannot be fixed simply by tweaking the coercion  
>> rules.  It probably requires that numeric literals be treated as  
>> generic values that are only interpreted situationally as either  
>> binary or decimal values in the context of a particular operations.
>
> That, or multimethods so we don't essentially carry around literals  
> in source form and pay high costs converting them according to  
> context. That was the ES4 solution at one point, until we started  
> cutting. Based on Dylan and Cecil precedents:

http://wiki.ecmascript.org/doku.php?id=proposals:generic_functions
http://wiki.ecmascript.org/doku.php?id=proposals:generic_functions#background_material
http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=chambers+cecil+multimethods

/be


More information about the Es-discuss mailing list