News for hackers. Stuff that matters.
Re:Subtype Inference by Example by juancn on Friday June 13, 2025 @03:14PM (#44271383)

  ...but traditional static type systems require large amounts of manual annotation by programmers, making them difficult to work with...
I like to have type annotations, yeah, they can look ugly, but I much rather know what something is rather than have to infer it by myself.

Makes reading code a lot easier if you know what you're doing.

Re:Subtype Inference by Example by jjice on Friday June 13, 2025 @03:49PM (#44271660)
FWIW, I've seen many IDEs and plugins add inline type annotations so it reads as though they are there, but aren't. I think the first time I saw this was with the JetBrains IntelliJ Rust plugin in 2019.
Re:Subtype Inference by Example by layla5alive on Wednesday June 18, 2025 @12:10AM (#44306588)
I like being able to read code in nano or vi
Re:Subtype Inference by Example by exac on Saturday June 14, 2025 @02:08AM (#44274545)
I would rather see the type annotations too. This whole essay has a flimsy premise.
Re:Subtype Inference by Example by mrkeen on Saturday June 14, 2025 @08:12AM (#44275914)
Around every integer? Around every expression? On every let-bound function, on every where-bound function? Should the 'forall. a' included if 'a' is a polytype?
Re:Subtype Inference by Example by juancn on Saturday June 14, 2025 @10:32AM (#44276673)
It depends on the aesthetics of the language I think. What are core concepts that you must know? (there should be few). Striking the right balance is hard.

Code is read a lot more than is written in my experience, so saving time writing it is optimizing for the wrong thing.

Languages with much inference for me REQUIRE IDEs that help you see what the code is actually doing. Forget about using a text editor or reading a diff and getting what the implications are.

Re:Subtype Inference by Example by afiori on Saturday June 14, 2025 @04:01PM (#44278467)
It would be nice to have them auto-generated in the source, like a autofixable lint rule where the compiler add the annotations to your source code.