Re:Robot Game: Comparing 6502 C, Assembly, and Forth
by coliveira on Sunday July 12, 2020 @12:57PM
(#23812757)
I think the writer use case takes no benefit from Forth. He already has some code and is trying to translate and optimize it. In this case, none of the advantages of Forth matter because he is not doing the development interactively. He was also tied to an existing code architecture that is alien to Forth. A Forth programmer starting from scratch would certainly design things in a way that makes more sense to Forth. Instead, his design clearly benefits a C implementation and goes against the way Forth code is structured.
[ Parent
| on HN ]
Re:Robot Game: Comparing 6502 C, Assembly, and Forth
by druzyek on Sunday July 12, 2020 @01:43PM
(#23813147)
OP here. This is a really interesting point. My strategy was to keep the highest level functions/words like DrawTile or DrawMenu while writing the underlying Forth and subwords from scratch focusing on performance. Do you have any suggestions that would make "more sense to Forth" as you say?
Re:Robot Game: Comparing 6502 C, Assembly, and Forth
by asguy on Sunday July 12, 2020 @02:18PM
(#23813435)
Not the GP, but I'd recommend the latest edition of _Thinking Forth_[0]; there's a PDF but the soft-cover is worth picking up. It helped change the way I think about Forth (hah), and really, programming in general.