3 ms·
The real question is why is the convention getFoo() setFoo(foo) and not foo() and foo(foo).
by slver 5y ago
The real question is why is the convention getFoo() setFoo(foo) and not foo() and foo(foo).
- whatshisface 5y agoNot all languages have overloading.
- slver 5y agoI'm referring to Java.
- whatshisface 5y agoI think the pattern was adopted from languages before Java which didn't have overloading.
- swsieber 5y agoIt makes for easier searching in small code bases with stuff like grep instead of needing full language server / ide support.