Difference between revisions of "Type system"

From OXPL Wiki
Jump to navigation Jump to search
m
Line 4: Line 4:
 
The primitive types are the most basic ones.
 
The primitive types are the most basic ones.
  
* integer
+
* integer: <tt>integer</tt>
** signed
+
** signed: <tt>int</tt>
 
*** <tt>int8</tt>
 
*** <tt>int8</tt>
 
*** <tt>int16</tt>
 
*** <tt>int16</tt>
Line 11: Line 11:
 
*** <tt>int64</tt>
 
*** <tt>int64</tt>
 
*** <tt>int128</tt>
 
*** <tt>int128</tt>
** unsigned
+
** unsigned: <tt>uint</tt>
 
*** [[uint8|<tt>uint8</tt>]]
 
*** [[uint8|<tt>uint8</tt>]]
 
*** <tt>uint16</tt>
 
*** <tt>uint16</tt>
Line 17: Line 17:
 
*** <tt>uint64</tt>
 
*** <tt>uint64</tt>
 
*** <tt>uint128</tt>
 
*** <tt>uint128</tt>
* float
+
* float: <tt>float</tt>
 
** <tt>float32</tt>
 
** <tt>float32</tt>
 
** <tt>float64</tt>
 
** <tt>float64</tt>

Revision as of 16:49, 21 January 2021

The type system of OXPL will be static and strong.

Primitive types

The primitive types are the most basic ones.

  • integer: integer
    • signed: int
      • int8
      • int16
      • int32
      • int64
      • int128
    • unsigned: uint
      • uint8
      • uint16
      • uint32
      • uint64
      • uint128
  • float: float
    • float32
    • float64
  • character: char
  • boolean: bool

Composite types

  • array: arr
  • string: str