(Yes, I'm aware of PostScript... Seems to be one of the sole exceptions here... And, uh, PDF... of course...)
(Yes, I'm aware of PostScript... Seems to be one of the sole exceptions here... And, uh, PDF... of course...)
She gave me the dirtiest "are you mansplaining me" look.
Using the HP was perfectly natural for her as she had used cash registers.
A common theme is that Forth-likes are very easy to implement on constrained hardware. I have a Strange Loop talk a couple of years ago where I go into this at the end, calling out uxn from the Hundred Rabbits folks. You might consider that more "hobbyist" than "production", but people are deriving real joy making apps and games in that ecosystem.
https://dcreager.net/talks/concatenative-languages/
For a counterargument, this is the most commonly cited argument that I've seen _against_ using a Forth-like in an industrial context:
https://yosefk.com/blog/my-history-with-forth-stack-machines...
> It is considered good functional programming style to write functions in point-free form, omitting the unnecessary mention of variables (points) on which the function operates.
This is wrong.
It may be considered good programming style in certain small use-cases when a small local composition is clearer. But as a general software engineering principle, the exact opposite is true: It is considered good style to break larger constructs into smaller pieces and give them meaningful names.
There's no reason that function parameters should be an exception to that and in practice, names for function parameters are often some of the most critical names for understanding a system.
I think concatenative languages are really cool as a mental exercise in getting a lot of power out of something simple. But as far as why they aren't used in practice. I think it's largely because they are a bad idea carried to its logical extreme.
I was working in sales/support/marketing for printer companies in the eighties and people were buying PostScript printers for the scalable fonts, device independence and compatibility. The most common objection was performance which was somewhat related to the programmability.
We used to supply the red and blue books with each printer but I don’t remember anybody breaking the seal on them.
Having said all that I have spent the last year writing a PostScript interpreter.
I’m not sure I’d call PDF concatenative, you certainly can’t cat two PDF files together to make a merged document. There are header and footer sections to deal with.
I do not agree. I think the mistake was using PostScript as the output document format, not its programmability. PostScript should be the input format and not the output format.
I think PDF has many problems and is badly designed in many ways, though.
Forth is a wonderful way to build a high-ish level self-contained programming environment on very low-resource hardware, like a 8-bit MCU. But thinking in terns of the stack is useless mental gymnastics, this is something a machine should do instead.
Fortunately the PS language was very well documented. That made writing PS pretty straightforward, at least for the reasons I was using it. Curiously other concatenative languages have been harder for me to grasp. Maybe that's because I regarded PS as a specific-use tool vs. a general purpose language.
If nothing else PS showed the value of excellent documentation. Lack of it probably accounts for many software project failures, particularly in the open-source world.
> Maybe that's because I regarded PS as a specific-use tool vs. a general purpose language.
In my opinion, it is both. Many of the programs I write in PostScript do not involve a printer at all.
> If nothing else PS showed the value of excellent documentation. Lack of it probably accounts for many software project failures, particularly in the open-source world.
I also find a problem with many programs that do not have good documentation. When I write my own, I try to provide documentation.
There are mental gymnastics but they are far from useless and not just thinking in terms of the stack. I don't quite have it down yet but I am getting closer and can see the sense in it, I haven't quite figured out how to plan and structure a program in Forth.