Webel: SysML4Mathematica: Convention: A custom SysML ValueType 'Quantity' extends a custom ValueType '_' (representing a Mathematica '_' Blank). It DOES NOT also extend the SysML Real!

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
Specification keywords
SysMLv1.x keywords
Keywords

It is not a good idea to have the custom Quantity ValueType extend the SysML Real primitive type, as it undermines Quantity type traceability throughout a SysML4Mathematica project. It is recommended in most cases that higher level (end use) functions (and their SysML model representations) keep a clean separation between Quantity and Real, even though Mathematica supports flexible pattern matching on arguments like function[arg:(_Quantity|_Real)].

Where frequently used custom utility functions in a Mathematica project do for most sensible and efficient convenience use argument patterns like function[arg:(_Quantity|_Real|_Integer)] or function[arg_?NumberQ]., there is no alternative but to have strongly typed variations of them in the SysML representation, for which one can use suffixes such as function$Q, function$R, and function$I to indicate their ValueType "family", or they can be placed in separate Packages (but otherwise with the same name).

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