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.
The use of CircleDot ⊙ as the infix operator for invoking ADT-Methods on Webel ADT "objects" is provisional:
SetAttributes[CircleDot, {Flat, OneIdentity}];
CircleDot[adt_, fAdt_Symbol] := fAdt[adt];
Example:
map1 = ADT$Map[<|"a" -> 1, "b" -> 2|>];
map1⊙keyList
{a, b}
It works okay in Notebooks using the slightly inconvenient sequence:
ESC c . ESC
The ⊙ looks good, and is easy to distinguish from any non-ADT coding. It makes it clear one is working within a particular custom system. But:
Typing \[CircleDot] in IDEs over and over is rather impractical!
In IDEs it's easier to use the regular calling form with the adt "object" as 1st argument:
keyList[map1]
{a, b}
The coding style can then get out of sync between the Notebook and the IDE
In a way this is not too bad, as it means you can tell what was coded in the IDE, as opposed to developed temporarily in a Notebook then transferred to the IDE.
Part of the reason that CircleDot was chosen is that it distinguishes the use for Webel ADTs from the user-contributed MTools OO, which uses a regular '.' period. The regular '.' period, while easy to type - and it works well in IDEs - is a dangerous can of worms (and there are some subtle side-effects of its use by MTools).
Dr Darren says:
In case you are wondering why IDE-friendliness matters, developing Wolfram Code libraries on a big complex project in the Wolfram Plug for IntelliJ IDEA is massively better (at least for the very complex projects of Webel IT Australia) than trying in the built-inThe Notebooks have some advantages in terms of expression awareness, and I use them in parallel to test my IDE developed code as I go. They complement each other. I sometimes develop quick test versions of new functions using a prefix 'tmp$' in the Notebook, then transfer it to the IDE once it is basically running, then polish it off in the IDE..wl
or.m
file editor.