2 ms·
>Not allowing free functions is really just a poor design choice. I don't see why. The verbosity is pretty minimal and you enforce the availability of a priva
by jayd16 8y ago
>Not allowing free functions is really just a poor design choice.
I don't see why. The verbosity is pretty minimal and you enforce the availability of a privacy scope you wouldn't have had. ie private static methods and members that your public statics can use.
Although, pure functions are nice if you can't trust the code you're calling won't surprise you.
- tasuki 8y agoI think this has to do with naming. Naming is generally hard, with free functions you must name the function, in Java you must also name the class. If you could show some examples of single method interfaces whose naming makes sense, I'd be delighted!