In Dart int, double and bool is declared with a low case letter, why are strings declared String?
Is there a reason for this?
In Dart int, double and bool is declared with a low case letter, why are strings declared String?
Is there a reason for this?
Not exactly, in Java it makes sense because String is not a primitive type like int, String inherit from Object. But in Dart why is String not declared "string" like int, when both inherit from Object class?
It would probably make more sense to capitalize every type in Dart, including Int, Double, and Bool, since all are descendants of Object and all other types are capitalized. So the question isn't why is String capitalized, but why are int, double, and bool not capitalized. I assume they just chose a naming scheme that would make Dart feel familiar to Java programmers, but I don't really know.