Hacker News new | ask | show | jobs
by cutler 2619 days ago
There's nothing lost by putting the sig in a companion file and leaving it to your editor/IDE to provide a popup.

Java 10 and 11 introduced real type inference, at least for local variables and function parameters.

2 comments

> There's nothing lost by putting the sig in a companion file and leaving it to your editor/IDE to provide a popup.

I don't want to go back to having to keep C header file in sync. Your IDE can hide that information from your as well, if you don't want to see it all the time.

It's been a while since I wrote Ocaml, but IIRC the compiler yells at you if your mli files are out-of-date, for whatever that's worth. So keeping them synced isn't really an issue.
”There's nothing lost by putting the sig in a companion file and leaving it to your editor/IDE to provide a popup”

It requires every (1) editor and IDE on the planet to add code for doing that, which means every (1) programming language on the planet needs a library for parsing such companion files, for the benefit of ??????

Except for historical corner cases such as original java with its repeated type annotations that make code with types tedious to read, I wouldn’t know what that benefit would be.

(1) that ‘every’ is a bit of hyperbole, but essentially true.