Hi Friends!
Reading through some of the big programs like Left, it seems like macros
don’t really get used much. They are featured pretty prominently in the
first days of the tutorial but then fade away.
Are macros a non-canonical way to write uxntal? Am I missing the
programs that use them more? Is there something about their performance
or ergonomics that make them less desirable?
I would have thought that they would make more "self-documenting" for
smaller bits of logic, as an extension to the way subroutines do it
for larger chunks. But I also haven't written much code yet and maybe
I'm bringing patterns from other language into uxntal that don't
belong there?
- apiarian
Hi apiarian!
Sorry for the delay, we've only just found a bit a connectivity.
Macros are fine, the problem is that I've never implemented them in
drifblim, which is the main assembler that I use. The idea was that
since the 100r apps might be used as examples, putting macros in them
added to much indirections and made them harder to understand for
someone just wanting to use a bit of the code for their own projects.
Uxnasm.c supports macros and I'm sure someday drifblim will too, I just
haven't gotten around to it yet :)
Dll
On 2024-07-28 09:12, Aleksandr Pasechnik wrote:
> Hi Friends!
>
> Reading through some of the big programs like Left, it seems like macros
> don’t really get used much. They are featured pretty prominently in the
> first days of the tutorial but then fade away.
>
> Are macros a non-canonical way to write uxntal? Am I missing the
> programs that use them more? Is there something about their performance
> or ergonomics that make them less desirable?
>
> I would have thought that they would make more "self-documenting" for
> smaller bits of logic, as an extension to the way subroutines do it
> for larger chunks. But I also haven't written much code yet and maybe
> I'm bringing patterns from other language into uxntal that don't
> belong there?
>
> - apiarian