0

Why Java's System.arraycopy() method name does not obey the lowerCamelCase naming convention for method names?

By the way, there is also method getenv() in the same class, which name's composition also strangely differs from, say, getProperty().

John McClane
  • 3,498
  • 3
  • 12
  • 33
  • 2
    Ask yourself the question - what came first, the language or the convention? Have a look at the JavaDocs and see when various methods were added – MadProgrammer Jul 28 '18 at 02:56
  • Maybe the convention wasn't there yet. Or the convention was there but enforcement was lax that day. Or the convention was there and being rigidly enforced and these just slipped through anyway. Who can say? – Kevin Anderson Jul 28 '18 at 03:11
  • 1
    But I'd be willing to bet a small sum ($0.02) that `getenv` was intentionally named the same as the identical `getenv` function in the C library... – Kevin Anderson Jul 28 '18 at 03:12
  • I vaguely recall seeing an interview where James Gosling said that they *would* have fixed these oddities if they hadn't been pushed hard to get Java into the marketplace (Java 1.0). Once it was released, it was impossible to fix them ... without breaking peoples' code. And the longer it was left, the harder it became to bite *that* bullet. By the time there was serious "buy in" from businesses, it was too late. (No IT manager is going to accept that Sun / Oracle has broken their enterprise-critical applications to just fix a style inconsistency.) – Stephen C Jul 28 '18 at 12:55

0 Answers0