News for hackers. Stuff that matters.
Re:The Wake Programming Language by tines on Sunday February 15, 2015 @05:35PM (#9054447)
I think that whether the semantics of the language make sense to a particular person isn't really the criterion for type-safety. The language does define what should happen in the case of the expression ([]+{}), so no violation of the type system occurs and the behaviour of the program is well defined.
Re:The Wake Programming Language by grey-area on Monday February 16, 2015 @04:25AM (#9055986)
More examples of js insanity here (1:20):

https://www.destroyallsoftware.com/talks/wat

How about {} + [], is that deliberately zero, and why is addition not commutative in this case if it is allowed? Or {} + {}?

I think most people would infer type safety to mean that attempts to coerce types which are meaningless result in an error, not meaningless output, like the result of "string" - 1, or {} + "string" or {} + []. Otherwise your type system isn't going to stop you doing something insane by mistake, and is therefore not adding any safety.

{} + "string" or similar just shouldn't be allowed, and in most languages (let alone type safe ones), it is not.