|
|
|
|
|
by uncr3ative
5173 days ago
|
|
Maybe because I'm not used to java anymore I constantly find myself wanting to do things that are "bad" in Java. I want my function to return more than one variable and then accept it on the other side like x,y = getCoordinates(); Yes I can do something almost like that in java with an array or collection but it's considered "wrong."
Sometimes, I want to have a module with just functions, not an a class.
Writing the long list of setters and getters that just return and set themselves is really frustrating to me, knowing that in other languages I would just have properties. And working around this in java by making them all "public" is considered "wrong." And while I agree that java has excellent tools, the one tool that doesn't work as well or as easily for me is the interactive console. Perhaps it's java's verbosity, or maybe this tool hasn't been as fleshed out as it has been in python, javascript and even php (phpsh), but I haven't found one that works as easily for me. |
|
Interestingly, I've never really felt the pain of not having a good REPL for java, although I often use it in other languages. Although Java isn't interpreted, unlike the other languages you mentioned, Scala is both interpreted and compiled, so it's not a great argument for why it doesn't have a good REPL. I think eclipse's very strong autocomplete somewhat obviates the need for it, because I know that I mostly depend upon bpython/ipython for the easy access to docstrings and information about arguments.
I wonder if part of the reason why I've never felt the need for a REPL in Java is simply because there isn't one built in, so it isn't a tool that I ever reach for. REPLs are great for prototyping, and for learning, but I've found that the more I learn about a language, the less I tend toward using the REPL, so perhaps it's simply that I got used to being able to edit my code instead of having to type it all in again.