AvnerCohen / inferify

Return a string representing the common datatype of a given Object[].
MIT License
0 stars 1 forks source link

Use standard js types #2

Open eladb opened 11 years ago

eladb commented 11 years ago

I think that inferify should use standard js types. For example, float is not a js type. In fact, float and integer are both number.

AvnerCohen commented 11 years ago

Initially I thought extending JS natives might be a feature by itself, I tend to agree it's a bit too intrusive with marginal improvement. should be numbers.

AvnerCohen commented 11 years ago

How about date? What do you think? typeof new Date() === "object"

Do you think it should be "object" or non native "date" ?

eladb commented 11 years ago

On Nov 19, 2012 9:48 PM, "Avner Cohen" notifications@github.com wrote:

How about date? What do you think? typeof new Date() === "object"

Do you think it should be "object" or non native "date" ?

Maybe you should use Constructor names instead of typeof names. Then you have String, Number, Date, Boolean?

— Reply to this email directly or view it on GitHub.