3 ms·
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
by josho 11y ago
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.
- Alphasite_ 11y agoBecause you're sacrificing consistancy and type safety for object to avoid increasing the syntax which feels like optimising for the wrong metric.
- jonathankoren 11y agoIt's a REPL! It's for debugging. If you're not optimizing for ease of use, you're optimizing for the wrong metric.
- lgas 11y agoYou 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.