Difference between revisions of "Isa"

From MiniScript Wiki
Jump to navigation Jump to search
(Added small details to subtitles)
(Added "see also")
Line 1: Line 1:
 
Because this wiki software does not allow topic names to begin with an underscore, this page contains two different topics.
 
Because this wiki software does not allow topic names to begin with an underscore, this page contains two different topics.
 +
 +
== isa (operator) ==
 +
<c>isa</c> is a [[:Category:Keywords|keyword]] binary [[operators|operator]] which tests the left-hand operator for membership in the type defined by the right-hand side.  That right-hand operator could be a user-defined map (to which the left-hand side might belong via the <c>__isa</c> chain), or it could be one of the built-in types [[number]], [[string]], [[list]], [[map]], or [[funcRef]].
  
 
== __isa  (map entry) ==
 
== __isa  (map entry) ==
 
<c>__isa</c> is a special entry in a map that refers to the map's base class.  It is part of MiniScript's support for [[object-oriented programming]].
 
<c>__isa</c> is a special entry in a map that refers to the map's base class.  It is part of MiniScript's support for [[object-oriented programming]].
  
== isa (operator) ==
+
== See also ==
<c>isa</c> is a [[:Category:Keywords|keyword]] binary [[operators|operator]] which tests the left-hand operator for membership in the type defined by the right-hand side.  That right-hand operator could be a user-defined map (to which the left-hand side might belong via the <c>__isa</c> chain), or it could be one of the built-in types [[number]], [[string]], [[list]], [[map]], or [[funcRef]].
+
 
 +
* [[Object-oriented programming]] in miniscript
 +
* The [[map]] type
  
 
[[Category:Language]]
 
[[Category:Language]]

Revision as of 08:03, 5 December 2021

Because this wiki software does not allow topic names to begin with an underscore, this page contains two different topics.

isa (operator)

isa is a keyword binary operator which tests the left-hand operator for membership in the type defined by the right-hand side. That right-hand operator could be a user-defined map (to which the left-hand side might belong via the __isa chain), or it could be one of the built-in types number, string, list, map, or funcRef.

__isa (map entry)

__isa is a special entry in a map that refers to the map's base class. It is part of MiniScript's support for object-oriented programming.

See also


This article is a stub. You can help the MiniScript Wiki by expanding it.