19

Normal lang:
int
bool
string
Java:
int
boolean
String

Comments
  • 23
    Because String is a class, wrapping an array of chars with a bunch of defined methods.
  • 23
    @irene no, std is sexually transmitted disease
  • 8
    String should always be treated as a class and should follow the same naming convention.

    Fuck c++ and c# for lowercase string.
  • 2
    Well, because you use int a lot more than any other data type so it makes sense to make it short. And String is uppercase because it is not a primitive type, you could also use Integer and Boolean instead of int and boolean but that would be a waste of memory if it is not explicitly needed.
  • 1
    @jespersh Yeah but the standard is to use string when declaring variables. Plus everything else about C# naming conventions is fucked too.
  • 2
    @D3add3d That shouldn't justify breaking the pattern.
  • 1
    @ScriptCoded what pattern?
  • 3
    I like "normal" language vs "Java" 😂
  • 1
    @D3add3d Well, if it's named boolean I don't belive it should be abbreviated to int
  • 3
    @ScriptCoded The thing is that JVM does not really know a "boolean" - it behaves and operates in exactly the same way as "byte", it probably was not meant to exist and int is probably directly linked to int in C
  • 0
    @D3add3d Hmm, didn't think of it that way. Though I guess they could still have named it bool 🙈
  • 1
    @irene Uh, I never said there is actual bool in C and it is byte, not int. 32 bits for a one bit variable would be quite the waste of space

    Edit: Ooooh, you probably meant to reply to @ScriptCoded
Add Comment