logoalt Hacker News

LoganDark • today at 12:09 AM • 1 reply • view on HN

Do you mean that if types had only to do with values, you would have to evaluate the term to determine type?

Also, 1 + "hello" is "1hello", obviously. Have you never read JavaScript? :)


Replies

hexasquid • today at 1:27 AM

I gather it goes through an intermediate coercion step where it is "1" + "hello".

What trips us up is having existing expectations for what an operator called + should do.