| ▲ | uvaursi 3 days ago | |||||||
This is a good use of macros. I understand people are frightened by how it looks but it’s just C in a terse, declarative style. It’s mostly straightforward, just dense and yes - will challenge you because of various obscure macro styles used. I believe “oo” is probably an infinity error condition or some such not 100% sure. I didn’t see the author discuss it since they said it’s not used. Was probably used during development as a debug printout. | ||||||||
| ▲ | saulpw 3 days ago | parent | next [-] | |||||||
I agree, some of the macros are very useful, and I've found myself wanting DO(n, code) as a simpler for-loop construct. In my own code, when I have some dozens of small things (like opcodes or forth words or APL operators), I specifically do want a "one-liner" syntax for most of them. The individual elements are usually so small that it's distasteful to spend 10 lines of code on them, and especially because the real understanding lies in the 'space between', so I want to see a large subset of the elements at once, and not put code-blinders on to focus on one element at a time. | ||||||||
| ||||||||
| ▲ | sebstefan 2 days ago | parent | prev | next [-] | |||||||
From the article >These are all pretty straight forward, [...] wrapping an expression in a block, defining a variable x and using it, conditional statements, and running an expression n times. Making your reader learn some ad-hoc shorthands you wrote to avoid declaring blocks, defining variables or writing conditions in my book is very impolite Style doesn't need to be innovative. | ||||||||
| ▲ | procaryote 3 days ago | parent | prev [-] | |||||||
> This is a good use of macros. no. | ||||||||