@jupiter I disagree. To me, primitive means either:

1) not comprised of smaller values, or
2) not involving a reference.

Strings don't qualify either way.

C#, unlike Java, has structs, which are primitive in sense 2 but not sense 1. It might be reasonable for dates to fall into this category. I wouldn't want strings to behave this way, because s1 = s2 shouldn't take time proportional to the length of the string.

@peterdrake @jupiter I tend to think of the lowercase aliased types as "simple" types, in the sense that they are very easy to set, manipulate, and reason about, and are supported in serialization, databases, etc. Also, coming from Java, I'm glad there aren't both Integers and ints and I have to care about the difference.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.