logoalt Hacker News

masklinnlast Monday at 6:32 AM1 replyview on HN

> "we want these elaborate type systems, but we also want typeless because that is far more convenient to use, so we invented generics, a method to untype your type system"

It's rather the exact opposite. Parametric types are a way to properly type "deeply" instead of just the topmost layer. Just like inference, type parameters don't remove types.

> isn't that just python, strongly typed but your functions don't have built in type checks.

That doesn't really make any sense? Static types mean you don't have runtime type checks, since the types are known statically.


Replies

oaieylast Monday at 8:31 AM

I also do not understand the motion that generics are loosely typed or dynamic. I think people mix this up, since it makes the frameworks and libraries more dynamic (in a strictly typed way) but that is a very different dynamic than language dynamic.