3 ms·
I'm not an expert. C++ uses -> for pointer dereference, e.g. o->p refers to the property "p" of object "o". I would assume C# inherits from C++ and had to defin
by tajen 11y ago
I'm not an expert. C++ uses -> for pointer dereference, e.g. o->p refers to the property "p" of object "o". I would assume C# inherits from C++ and had to define another operator.
Java probably followed Scala's notation, which is probably derived from mathematics where ↦ is an application (a function) and ⇒ is a simple logical implication.
- incepted 11y agoActually Scala uses =>, so Java went the opposite way. Kotlin also uses ->. Doesn't matter much in the long run, you'll get used to whichever your language favors after just a few days or writing code in it.