Light
Dark
System
v4latest
v5dev
v4latest
v3
v2
v1

Abstract Types

Abstract types are used to describe polymorphic functions, otherwise known as “generic functions,” which can be called on a broad range of types.

type

anytype

A generic type.

It is a placeholder used in cases where no specific type requirements are needed, such as defining polymorphic parameters in functions and operators.

type

anyobject

A generic object.

Similarly to anytype, this type is used to denote a generic object. This is useful when defining polymorphic parameters in functions and operators as it conforms to whatever type is actually passed. This is different friom BaseObject which although is the parent type of any object also only has an id property, making access to other properties and links harder.

type

anyscalar

An abstract base scalar type.

All scalar types are derived from this type.

type

anyenum

An abstract base enumerated type.

All enum types are derived from this type.

type

anytuple

A generic tuple.

Similarly to anytype, this type is used to denote a generic tuple without detailing its component types. This is useful when defining polymorphic parameters in functions and operators.

These abstract numeric types extend anyscalar.

type

anyint

An abstract base scalar type for int16, int32, and int64.

type

anyfloat

An abstract base scalar type for float32 and float64.

type

anyreal

An abstract base scalar type for anyint, anyfloat, and decimal.

There are some types that can be used to construct ranges. These scalar types are distinguished by the following abstract types:

type

anypoint

Abstract base type for all valid ranges.

Abstract base scalar type for int32, int64, float32, float64, decimal, datetime, cal::local_datetime, and cal::local_date.

type

anydiscrete

An abstract base type for all valid discrete ranges.

This is an abstract base scalar type for int32, int64, and cal::local_date.

type

anycontiguous

An abstract base type for all valid contiguous ranges.

This is an abstract base scalar type for float32, float64, decimal, datetime, and cal::local_datetime.

Light
Dark
System

We use ChatGPT with additional context from our documentation to answer your questions. Not all answers will be accurate. Please join our Discord if you need more help.