News for hackers. Stuff that matters.
Re:TypeScript’s quirks: How inconsistencies make the languag... by alexcole on Friday January 31, 2020 @11:31PM (#22208674)
> In Java you can assign any non-primitive typed expression to a variable of type Object.

Sure, but if you do this in Java you must use different variable names for the reference of type Animal and the reference of type Object.

I think algebraic data types and type refinement are great, but I’m not a fan of automagically changing the types of variables in different scopes if it can’t be applied consistently.

There are no comments on this comment yet.