# Examples of (well coded) packages using custom notation

Which packages do you know of, that have the following properties:

• using custom notation (for input AND output would be preferable)
• well coded & designed (from your subjective perspective!)
-
What criteria would you use to assess the second bullet point? – Verbeia Oct 16 '12 at 11:02
that is a quite subjective question – Rolf Mertig Oct 16 '12 at 12:17
For the notation part: well coded means that the custom notation does always work as expected for input and output and that it does not interfere with other packages or user notation (or at least minimize that interference) – NoEscape Oct 16 '12 at 12:53
Even if "well coded" is subjective, just answer from your subjective mind. – NoEscape Oct 17 '12 at 14:04

I'm not going into the well-coded part of your question (as this is rather subjective), but a package that I've (cursorily) examined and which looks nice is this quantum notation package, which has lots of custom notation and corresponding palettes.

-

Besides the quantum package already mentioned by @Sjoerd, the package with the most customized notation that I know of is the THEOREMA package. You can freely use the package and admire the complex logicographics notation created, but the code is not available for inspection.

Finally, the OP leaves me No-Escape (pun intended) but to mention my WildCats category theory package which is perhaps a unique example of 3rd party package using the standard Notation package together with some hand-made (MakeExpression, etc.) custom notation. You can inspect my code.

-
@NoEscape, I think that's a little unfair. The .m file is autogenerated from a notebook, which may contain extensive comments. There's no real motivation for the developer to put (* *) comments into the code cells just so they appear in the .m file. Given that the package includes 13 tutorials and 135 symbol reference pages there is hardly a lack of documentation. The source notebook may also be split into sections and subsections, so the fact that a single .m file is produced is no reflection on how well the code is structured. – Simon Woods Oct 18 '12 at 20:05
@NoEscape - that question exists already on this site. – Verbeia Oct 19 '12 at 2:21
@Simon has perfectly well expressed my point :-). On the other hand - experimenting with the OP characteristic diplomatic writing style - it might be said that , if one needs comments to understand my code, than perhaps he/she needs to read Wolfram's book and some category theory first. No offense here :-) Anyway...prior releases of WildCats indeed also included the much more friendly .nb file . – magma Oct 19 '12 at 10:48
OK. It is well coded and working, but hardly readable. This is a fundamental problem of autogenerated packages! – NoEscape Oct 20 '12 at 5:36
@NoEscap WildCats is created with Workbench, but I use the internal MMA editor, so I make a heavily commented/sectioned .nb file. The autogenerated .m file is for deployment only. – magma Oct 21 '12 at 9:50

I suggest those two tutorials for writing Mathematica packages, unfortunately the first one is in Spanish, yet I do believe it will be useful for anyone because the step-by-step images; the second one is in English.

-