I spent a couple of weeks getting into Factor in 2022 and it was the most fun I’ve had programming, probably ever. Language itself aside, the dev environment and process of writing Factor is just delightful.
I did this back in 2009 for a couple of months and it was fantastic. I then switched to Clojure because it was a little more mainstream (relatively speaking at least haha), but I feel I learned a lot from my time with Factor. It certainly made me respect the language and concatenative style.
I think Slava Pestov bowed out and ended up at Apple, or vice versa. His GitHub traffic looks like he’s working on the Swift compiler? But others have taken over.
I used to use JEdit, and Factor was new during the era when people still had blog rolls so I ended up hearing a lot about Factor.
Factor is a concatenative, stack-based programming language with high-level features including dynamic types, extensible syntax, macros, and garbage collection. On a practical side, Factor has a full-featured library, supports many different platforms, and has been extensively documented.
I remember first seeing Factor more than a decade ago (maybe even when it just launched, if memory serves correctly). It's really neat to see it thriving.
Factor is one of those projects that stands as a huge challenge to other conventional languages and their runtimes (or it would if anyone took it seriously that way.) The compactness and power, the "bang for the buck" is staggering.
Factor is a lot of fun. I have a dream of one day building an OS from a Forth bootloader all the way up to a highlevel language. Do wish it had a more expressive type system though.
Would it be feasible to build a larger application using a language like Factor? I have no experience with concatenative programming, and it seems interesting, but I also get the feeling that larger systems would become rather complex and hard to read.
I think questions like this cannot have an objective answer. I dealt with code written in lisps, and Forth. There are plenty of people who claim they are hard to read, but in my experience once your brain starts to recognize patterns, and idioms it becomes crystal clear and logical. At the same time I find myself taking more mental effort parsing code in languages which like to overexplain by repetitiveness, like Java with its "Foo foo = new Foo". I have a colleague however who believes that everything which is not Java is barely readable. Probably, it's related to the fact that he writes Java exclusively for a very long time.
I want to like and use Forth for something, but this from the post sums it up pretty well.
"I told my partner that the final device could not be
programmed in Forth. Why would I say such a thing? Simply because
technology had passed Forth by, in my opinion. It was no longer
possible for one person to develop all the software required in a
graphical environment. I needed to buy the tools I needed to leverage
my time for a professional job. I could no longer play the role of the
maverick programmer, nor did I want to. I need to be part of a
collaborative community in which I can give and receive work. I do not
see Forth as a viable solution as of today."
That was 1995. His "story" also ended in 1995 with him being unemployed. The author is Allen Cekorich, which made it easy for me to look him up on LinkedIn and see what happened after. Yes, LinkedIn is good for something. Sounds like he landed on his feet.
Wielded well (read "Starting Forth" and "Thinking Forth") the concatinative languages are very good for eliminating incidental complexity, so code approaches the Kolmogorov complexity of the problem or task it's for.
> takes a lot of skills and hard work to break the problem down
Same for every programming language.
The advantage that concatinative languages have over others is the closeness of their syntax to the semantics of the domain which makes them much easier to learn and use than other PLs (unless one has previously learned the other PLs first. Otherwise PLs like C and Java seem hopelessly baroque.)
All languages fall on a spectrum, different priorities, strengths and weaknesses.
Forth is all about simplicity of implementation, it's the number one idea driving every decision. Which means a lot of other priorities, like higher level abstractions, are more difficult to achieve.
It does make a nice DSL sometimes, so does Lisp, to an even greater extent, while providing plenty of higher level abstractions.
> A simple solution has elegance. It is the result of exacting effort to understand the real problem and is recognized by its compelling sense of rightness. I stress this point because it contradicts the conventional view that power increases with complexity. Simplicity provides confidence, reliability, compactness, and speed.
> It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience.
> a lot of other priorities, like higher level abstractions, are more difficult to achieve [in Forth]
I'm not a Forth person myself but if I were I would challenge you to name a higher level abstraction or other priority that was difficult to achieve in Forth, or perhaps, more topically, in Factor.
Like I said, I'm not a Forth person, but if there were any around to settle it I would bet you all those things have several implementations (I do know that many people have written OOP and OOP-like things in Forth.)
> I mean the same functionality, flexibility and level of convenience.
I feel like you're missing the point (although there's such a thing as ANSI Forth so you are in good company). In Forth re-implementing an exact model of some other system (like CLOS, which is, of course, very nice, I don't need to tell you) is a non-goal (you could do it but it would be kind of a stunt.)
The fundamental advantage of concatinative languages over pretty much all the other PLs and paradigms (except maybe Smalltalk and APL) is that they permit parsimony of code, what some have called "semantic compression", by refactoring better than other languages. One of the reasons Lisp is so powerful is that it's also pretty good for refactoring.
I could prove this using Category theory (and God willing someday I will), concatinative languages are closer to the metal (the "metal" in this case being, not the hardware, but the conceptual essence of programming and logic.)
Clicking around the website for the past 30 minutes has left me way more confused about what this is than when I started. I get the feeling that it would take me at least two weeks to figure out how to make a todo list app in this language.