> I thought that would be too trivial demonstrate though. If you really don't like how it looks, you can fix it with two more lines of reader macros. The result would be a nicer syntax as you wouldn't have to put spaces around the braces.
The example is 'trivial' though. Also compare how big Forth is against CL, I mean Forths are often well under 10KB. I've written a Forth like this. I've never written a CL. Have you?
> Those are a few lines of highly complicated code that does something very simple and just happens to use the short function names
Just because you're incredulous doesn't mean that's not a feature.
> easier to write in almost any other language, which is what I was demonstrating with the CL example
CL isn't 'any other language' though, lisps specifically have quite powerful reflection.
> hack together a half-solution for a problem Forth created
Hacky half-solutions are charming, and Forth didn't create the 'problem' of structured syntax, it just didn't provide a solution out-of-box. That's one of the very explicit tradeoffs of the language.
I would say a lot of this is because CL has a large standard library, but not much of that is primitive. Even then, I would say the CL standard lacks many things, so it is too small for general use rather than too large. From a perspective of implementation, I would almost always choose a small Scheme over Forth or something Forth-like.
> CL isn't 'any other language' though, lisps specifically have quite powerful reflection.
Those functions don't use reflection.
> Forth didn't create the 'problem' of structured syntax, it just didn't provide a solution out-of-box. That's one of the very explicit tradeoffs of the language.
It created the problem of not having structured syntax and that's a trade-off that you lose as soon as you write more than a maybe a hundred lines of code.
Sorry I mean macros / or whatever. You know what I mean(?).
> that's a trade-off that you lose as soon as you write more than a maybe a hundred lines of code
And yet you can have braces with e.g. 2-3 lines of code. Anyway this is beyond tedious now, sorry for provoking you with my code, or my opinion that Forth is interesting, or with the praise I received, or that Forth kicked your dog or something; I'm not really sure what did it. I have talked with you in good faith to try and help you understand why it's interesting to me, I don't claim it's an absolute good or even necessarily practical in most situations.
You misrepresent me here. I never claimed that Forth is uninteresting, just that your code was. The statement I take issue with is that Forth is powerful. In reality, it is useful only because it is not powerful and hence is easier to implement.
> yet you can have braces with e.g. 2-3 lines of code
You can't really. You'd be better off treating braces as whitespace than having them check the stack depth before and after each function call. They wouldn't even be correct then because you could make multiple calls within the same set of them. If you want to implement braces properly, you'd need a way to introspect how many arguments a function takes, but Forth is not powerful enough to do this.
Okay.
> I thought that would be too trivial demonstrate though. If you really don't like how it looks, you can fix it with two more lines of reader macros. The result would be a nicer syntax as you wouldn't have to put spaces around the braces.
The example is 'trivial' though. Also compare how big Forth is against CL, I mean Forths are often well under 10KB. I've written a Forth like this. I've never written a CL. Have you?
> Those are a few lines of highly complicated code that does something very simple and just happens to use the short function names
Just because you're incredulous doesn't mean that's not a feature.
> easier to write in almost any other language, which is what I was demonstrating with the CL example
CL isn't 'any other language' though, lisps specifically have quite powerful reflection.
> hack together a half-solution for a problem Forth created
Hacky half-solutions are charming, and Forth didn't create the 'problem' of structured syntax, it just didn't provide a solution out-of-box. That's one of the very explicit tradeoffs of the language.