Hacker News new | ask | show | jobs
by karparov 459 days ago
> That’s what the type system is for: a means of grouping similar bits of information into an easy-to-use whole.

While types can be used for that, they are a much broader concept.

I would say the general purpose of types is to tell apples from oranges.

1 comments

not to mention having some actual confidence when making changes to a project! especially one you didn’t author.
...even in a strictly-statically-typed language with a perfectly expressive type-system, it would be unwise to rely _only_ on a "Build succeeded!" message for having confidence in any changes to the system: there's no substitute for well-trodden unit and integration tests for any codebase of nontrivial importance or complexity.
it does eliminate an entire class of issues thougj. The typical “property not found” type of issues that are common in vanilla javascript, python, etc.

Having types helps the IDE help YOU! That’s my favorite part about types and a strong IDE like Webstorm or IntelliJ. I agree it’s not a substitute for proper testing though.