Richard Bucker

Factor Lang

Posted at — Sep 13, 2020

Factor is an interesting language idea. Frankly I couldnot do the language justice but it seems to me to be a framework with a syntax. And so it’s self referencing in a manner of speaking. For example it does not explicitly implement generices but with a small module (read plugin) suddenly it supports generics.

One thing that caught my attention was that the presenter showed a javascript parser example… the JS part was a simple spec that looked like BNF of sorts but was actual code. From there it would be a small task to join the code to “functions” (called words in factor).

What is interesting about the factor language is that it look like a VM or even macro assembler. And that it’s self referential. Yeah! But what I hate about it is the complexity of the syntax. Everything seems to have subtle side effects.

Ok, now the hate.

Factor would be better if it were a grammar and some rules defined in some universal grammar where a code generator written in any language could generate the environment. In the current state it’s a curiosity.