SMITH#
After the success of Microsofts C#, which is a extension of C++, I thought it befitting to do something similar to one of the most fun-to-write languages on the planet: SMITH. SMITH is widely used mainly because it does away completely with GOTOs, LOOPs and all that, making LOOP design very simple: there are none. (This is not quite true, but remember: when C# says it does not have pointers, this is not quite true, either).
Outstanding Features!
SMITH# relies entirely on code self modification to perform profane things such as loops and recursion. That much was already implemented in SMITH. However, SMITH# provides many extensions that make programming even more easier, by providing things such as:
- Alternate keywords to suit your moods. For example, if you hesitate typing "+" for religious reasons (it reminds you of a rare christian symbol) you can just type "add" instead.
- SMITH# does not discriminate between data and code. Generally speaking, discrimination is almost always a bad thing ! More specifically, SMITH# does away with registers.
- SMITH# does not discriminate between relative and absolute addressing, there is only absolute addressing. For convenience, you can do absolute indirect addressing, if you insist. [The PC-relative addressing in SMITH went against the fundamental design principles of SMITH, in my mind]
- SMITH# does not use "immediates". Why use something else, when you have absolute addressing to fit all your needs ? I think, the use of immediates in SMITH just made that language too complicated for the average programmer.
- SMITH# is a freeform language, that is very easy to obfuscate, so as to make training for the IOCCC possible.
- SMITH# introductes the concept of citing, which has been around in theoretical papers for a long time, but to my knowledge has never been used in a programming language of considerable scale before.
- The instruction set has been at the same time reduced and expanded: basically, it is a whole different opcode set compared with plain SMITH#, but, once again, the situation reminds one of C#.
- Support for OPP.
Now that I got you wet for SMITH#, here is a documented version of Hello World in SMITH#, and an obfuscated version of Hello World. Yes! both are valid SMITH# code, and both implement the same basic functionallity. Great, eh ?!
Download
SMITH# has a BSD-style license.
- You can download the full SMITH# distribution, which includes both Win32 binaries and sourcecode, from here.
- You can download the full SMITH# distribution for Linux here.
- You can download the distribution for the AMIGA here. (Tested with WinUAE only, comments welcome). Note that the binary had to be renamed to "smith", because # is a wildcard token on the Amiga.