Hacker News new | ask | show | jobs
by klipt 807 days ago
> It makes code harder to read

One could argue it's better for type inference to not just be part of the language but also part of the IDE. E.g. you type

auto x = ...

And then the IDE offers to replace the auto with vector<SomeClass>

That way you can both write code with type inference, but read code with fully annotated types!

1 comments

That's actually how I use IntelliJ, I'll type something like

  x = foo();
And then accept the correction it offers to

  vector<Bar> x = foo();
Which is nice enough since you can invoke all this with just the keyboard.