Mathematica: Webel: ADT pseudo classes: POLICY: The Abstract Data Types (ADTs) are stateless functional (although inheritance and overrides are supported), with no caching by default (although there is nice optional caching using CreateUUID[] and Once[]).

Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords

An ADT "method" function in the Webel recipe for strong types has no state and always returns the same expression given the same input, for any ADTs of the same ADT signature. There is a slight "side door" concerning some necessary use of at least some package scope "globals" for some support resources, but that can be ignored as pedantic for the purposes of the definition here.

Where performance is an issue, the Mathematica Once[] caching mechanism may optionally be used, but is disabled by default.


If you want to try OO with support for state in Mathematica consider trying the (not fully fledged but very useful) user-contributed MTools package for (some) OO in Mathematica.

Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links