Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's wrong with simply: Object foo = ...

Not quite var, and it would require the interpreter to do a little bit more work when invoking methods to avoid the necessary downcasting.



Because you're sacrificing consistancy and type safety for object to avoid increasing the syntax which feels like optimising for the wrong metric.


It's a REPL! It's for debugging. If you're not optimizing for ease of use, you're optimizing for the wrong metric.


You could also just add support for the "var x =" notation into the REPL as a preprocessing step that translates it to the appropriate typed representation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: