World's most popular travel blog for travel bloggers.

Programming Symbols : Instance/Instantiation

, , No Comments
Problem Detail: 

Is there a generally accepted symbol for indicating instantiation. That is indicating an object is an instance of a class.

My first guess is to use a left arrow with a double or triple line but this seems more like a functional programming symbol, based upon what I've seen of Haskell.

Wikipedia has no examples and a quick google for psuedocode mostly turns up simple functional or procedural algorithms. Object Orientated examples don't seem to feature or do not use any specific symbol.

Asked By : Carel

Answered By : jmite

In most contexts, objects are values and classes are types, so I would simply use the colon, representing the "has type" relation:

$Object : Class$

That said, this depends on your context, and whether $:$ carries some other meaning. You could also use $\in$, since you can identify a class with the set of objects that are instances of that class.

Best Answer from StackOverflow

Question Source :

3200 people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback