Why is boolean stylized as bool, but string stylized as String?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Kyllingene

In GDScript, the boolean type is called bool. No problems. The string type, however, is called String. Why the difference in style between the two?

:bust_in_silhouette: Reply From: timothybrentwood

String is an object with functions you can call on it like my_string.length(). bool is a “primitive” like float or int. You call str(my_boolean) not my_boolean.to_string().

You can read more about the concept of primitives here: Primitive data type - Wikipedia