Any type is a reference to a value and operations on that value. A class is one way of expressing a type. Types are defined by the operations that can be performed on them, not just their raw value -- if one can even define a value absent of any operations on it.
The part I dislike is that classes can represent a bunch of things that don't work like value types as well. I wish these were distinct entities. I called them "service" in the language I was working on.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I can also be pedantic and say it is a type. :)
Any type is a reference to a value and operations on that value. A class is one way of expressing a type. Types are defined by the operations that can be performed on them, not just their raw value -- if one can even define a value absent of any operations on it.
The part I dislike is that classes can represent a bunch of things that don't work like value types as well. I wish these were distinct entities. I called them "service" in the language I was working on.