Karl Toby Rosenberg
01/21/2025, 6:03 PM# instead of:
if bla:
do_bla()
if blabla:
do_blabla()
else:
other()
else:
other()
# do
if bla {
do_bla()
if blabla() {
do_blabla()
}
else {
other()
}
else {
other()
}
Okay it’s hard to read, but it makes me think: any block of code could really be its own function, and suppose we had a kind of function that was purely an inline macro to jump to without any stack rules. The goal would just be to make code look as procedural/linear as possible.
if bla do_bla() else other()
#define do_bla somewhere somehow in a way that keeps the same scope without param/stack rules
Sure this would probably require more annoying steps and jumps for some, but I do wonder how it might impact early learners or maybe prove useful (or not useful) for understanding control flow
Maybe if an editor could automatically inline code folding off and off with these macros…
Probably more of a structured/dynamic editor that isn’t just pure text.
I’m sure this path has been followed before, but I wonder.
It’s really just closer to ASM languages with the conditional jumps and islands of code. Strangely, I find those pretty not so hard to understand. No nesting.Jasmine Otto
01/21/2025, 7:23 PMJasmine Otto
01/21/2025, 7:24 PMKarl Toby Rosenberg
01/21/2025, 7:25 PMJasmine Otto
01/21/2025, 7:27 PMKarl Toby Rosenberg
01/21/2025, 7:29 PMJasmine Otto
01/21/2025, 7:35 PMJasmine Otto
01/21/2025, 7:36 PMKarl Toby Rosenberg
01/21/2025, 7:36 PMJasmine Otto
01/21/2025, 7:39 PMKarl Toby Rosenberg
01/21/2025, 7:42 PMJasmine Otto
01/21/2025, 7:44 PMguitarvydas
01/21/2025, 9:27 PMKarl Toby Rosenberg
01/21/2025, 9:39 PMguitarvydas
01/21/2025, 10:02 PMKarl Toby Rosenberg
01/21/2025, 10:03 PMJason Morris
01/22/2025, 12:13 AMKarl Toby Rosenberg
01/22/2025, 12:17 AMJason Morris
01/22/2025, 12:18 AMKarl Toby Rosenberg
01/22/2025, 12:25 AMJason Morris
01/22/2025, 12:35 AMKarl Toby Rosenberg
01/22/2025, 12:36 AM