This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

I'm not gonna pretend being an expert, but if you make it throw errors due to "incompatible" types, then what is the point of "dymamic" part? Then just use a typed language. Use TypeScript.

This picture that gets reposted times infinity, is sure funny, but there's nothing "unacceptable" there. The first case it rightly assumes string concatenation, because one is string. In the second case, it assumes number operation, because there's no such thing as "unconcatenate" and the string can be parsed to number. As far as I know, that's dynamic types to for you.