Mar 31, 2008

Flaming Thunder

I'm checking out this new language called "Flaming Thunder", a mathematical programming language with a cool name.

First impression: It is trying to do things that have been done before and failed, and it is comparing itself to languages of a different class (Java, C++).

Good aspects of it:
- It is easily readable. What language does this remind me of right away? COBOL. Where is COBOL? Useful if you want to maintain software written thirty years ago. Other than that, useless. Easily readability is good, but it shouldn't take away from the ease of coding. Suppose I want to output a number in variable x and then move to the new line:
Write x, NewLine.
The lines end in a period, like English. While I agree that this is better than the semicolons that are used in C++ or Java, there are no terminating characters in Ruby or Python. The period makes it awkward for certain operations:
Write 50!.
which looks odd. Why not make the period optional? Languages don't need a terminator to determine where the end of the statement is. Second, the character that is represented in other languages as "\n" as a nice, short little notation for a new line is represented as NewLine in Flaming Thunder. While this may be clear, it takes 5 seconds to explain to an engineer that "\n" means NewLine. And they've given up a nice short-hand for the sake of unneeded clarity.
- Arbitrary precision arithmetic. Always handy, although Ruby and Python do this too. They criticize C++ and Java for not having it, but if you're using C++ or Java for large calculations then you're either ignorant or idiotic. These languages are designed for speed, not for calculating large numbers. Don't compare apples with oranges.
- Interval arithmetic. Great for experimental science, when you have uncertainties in your measurements.
- Fast garbage collection. Uses stack-based allocation and reference counting to handle memory management. This is very good, and the perils of reference counting don't appear here since you can't have cyclical references.

Bad aspects:
- Verbose. As a programmer, I believe that more is less. If I can express something in less characters, that's better. For example, setting a value:
Set x to 5.
While very clear, I'd rather use
x = 5
Or even better, use := for assignment (although this is longer, there are big problems with using = for assignment). For strings, I'd rather use strlen() or myString.length() instead of GetStringLength().
- Lacking modern programming structure. There are basic loops and if statements, however the examples make heavy use of the GO TO construct. Last I checked, this was dumped in the 70's as very bad programming practice. Oh, and no structures, arrays or classes. This is not a bad thing, as Lisp only has lists and does very well. But when they keep comparing Flaming Thunder to C++, they should be able to back up their language when people talk about things C++ can do that Flaming Thunder can't.
- Lack of shorthands. In Flaming Thunder, --x means "the negative of a negative", as a mathematician who has never programmed before would expect. A programmer with experience in other languages would see this as "decrement the value of x and return the value of the variable after". In order to write this in Flaming Thunder, you would have to put
Set x to x - 1.
- On non-Windows platforms, you need to compile. This is a huge productivity loss. For Windows they provide a text editor that runs the programs, but lacks several handy editing features like Ctrl+A to select all, indentation detection, code folding, syntax highlighting, etc. Use Ruby with Kate and you're better off.

The language looks pretty cool, although I can't really see why I'd use it over Ruby or Python. My biggest problem with it is that it is a domain-specific language (simple mathematical calculations) but they argue that you should use it instead of C++ or Java. I argue this too, using C++ or Java for scientific research is not a great idea! These languages were not designed with scientific research in mind. Use the right tool for the job. Arguing that Flaming Thunder is better at scientific research than C++ or Java is like arguing that a hammer is better for driving nails into things than a screwdriver.

1 comment:

Anonymous said...

Hi, thank you for checking out Flaming Thunder, and thank you for your comments. I'm the guy writing it (Dave Parker) and your suggestions help me improve and prioritize. Dave