3 ms·
> I write code in both ... > If I look at Forth code I wrote a month ago I have no idea what it's doing. Sometimes when we are learning a language, we plateau
by geocar 1y ago
> I write code in both ...
> If I look at Forth code I wrote a month ago I have no idea what it's doing.
Sometimes when we are learning a language, we plateau in our learning for so long we think we are done, however I assure you that other people can read Forth code written months or years ago, even written by other people, and can read it.
That's not you, at least not yet, and you should be cautious with your certainty about things you just don't know about.
Writing code is substantially easier than reading it, but reading is when it is possible for us to know the language.
> I could never bootstrap a Lisp compiler that way.
Don't be so hard on yourself: You can, but you would have to change and learn in order to do it.
- HelloNurse 1y agoLISP has more names (for function arguments), which convey more information.
- geocar 1y agoI don't think you know what you mean. Experienced Forth programmers do not tend to make functions with lots of stack-based temporary references, but leverage the hyperstatic nature of globals which are effectively keyword arguments for subroutines. Pre-CL, lisp programmers use dynamic variables in a similar way (especially around the reader and writer), and whilst this carried over into keywords in CL, the vestiges of the defaults being the old dynamic variables remains.
- HelloNurse 1y agoYou seem to be arguing that LISP can be written with more global variables and less function arguments than modern "mainstream" style, closely matching Forth with global variables: from the point of view of readability it means gratuitous handicapping by throwing away a syntactic advantage of LISP (actual, formal names instead of optional comments).
- geocar 1y ago> You seem to be arguing that LISP can be written with more global variables and less function arguments than modern "mainstream" style, closely matching Forth with global variables: I am not arguing anything of the sort. I am saying Forth programmers don't program Forth with deep stacks, and explaining how that is possible. > from the point of view of readability it means gratuitous handicapping by throwing away a syntactic advantage of LISP (actual, formal names instead of optional comments). I'm not sure exactly what you could possibly mean here. Sorry. standard-input seems like a perfectly cromulent name; I'm not sure how :stream is "more formal" or even what that means. Lots of lisp programmers I know prefer using a dynamic variable like standard-input instead of passing a keyword :stream argument, but friend if that's not you good for you buddy. I'm not trying to convince you one is better than the other for lisp, only if you've spent any time programming lisp you're surely familiar with this and so use it to have some idea how Forth programmers are able to program Forth without such deep stacks.