Hacker News new | ask | show | jobs
by helix278 635 days ago
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.
3 comments

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.
Here’s a somewhat related, albeit casual, read - if you’re curious: https://groups.google.com/g/comp.lang.forth/c/ThWiGXwKqv4
This is called "A Forth Story"

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.

https://www.linkedin.com/in/allen-cekorich-a86aa731/details/...

Yes, it's feasible.

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.

Feasible, but takes a lot of skills and hard work to break the problem down into small enough pieces.

It's a different way of writing software.

> 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.)

I don't agree.

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.

~ Chuck Moore, from "Starting Forth" foreword.

https://www.forth.com/starting-forth/0-starting-forth/

> 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.

~ Einstein

https://quoteinvestigator.com/2011/05/13/einstein-simple/

> 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.

CLOS or Conditions from Common Lisp then, or LINQ from C#, or sum types.

And I don't mean something that looks sort of similar; I mean the same functionality, flexibility and level of convenience.