Tools for creating classless objects, with prototype based inheritance, in Mathematica.
You can find usage examples in answer to "Once more on object orientation..." question on Mathematica Stack Exchange.
To install ClasslessObjects package evaluate:
Get["https://raw.githubusercontent.com/jkuczm/MathematicaClasslessObjects/master/BootstrapInstall.m"]
Note that this will also install ProjectInstaller package, if you don't have it already installed.
To load ClasslessObjects package evaluate: Needs["ClasslessObjects`"]
.
-
Download latest released ClasslessObjects.zip file.
-
Extract downloaded
ClasslessObjects.zip
to any directory which is on Mathematica$Path
, e.g. to one obtained by evaluatingFileNameJoin[{$UserBaseDirectory,"Applications"}]
. -
To load the package evaluate:
Needs["ClasslessObjects`"]
To use package directly from the Web, without installation, evaluate:
Get["https://raw.githubusercontent.com/jkuczm/MathematicaClasslessObjects/master/ClasslessObjects/ClasslessObjects.m"]
This package contains extensive automatic test suite. Package is being tested with Mathematica versions 8.0, 9.0 and 10.0 on Linux. Since it doesn't contain any OS specific code it should work with above versions on all operating systems.
There's also no obvious reason for package not to work on earlier (6.0+) versions of Mathematica.
If you find any bugs or have feature request please create an issue on GitHub.
Feel free to fork and send pull requests.
If you want to use Ant scripts from this repository you will also need to install WWBCommon project.
All contributions are welcome!
This package is released under The MIT License.
Parts of code of this project are inspired by OO package created by Leonid Shifrin used under MIT License.
Parts of code of this project are a derivative of code written by Leonid Shifrin in Once more on object orientation in Mathematica: does it have to be so hard? thread on Mathematica Stack Exchange used under Creative Commons Attribution-ShareAlike 3.0 Unported License.
Releases of this package will be numbered using Semantic Versioning guidelines.