3 ms·
Yep. I am working on a statically typed stack-based language, as I quite like the Forth style. Stack manipulation sucks, so I mainly use locals for auxiliary pa
by evincarofautumn 12y ago
Yep. I am working on a statically typed stack-based language, as I quite like the Forth style. Stack manipulation sucks, so I mainly use locals for auxiliary parameters, to get them out of the way of the main data structure or values that a definition is manipulating implicitly. For example:
define do_the_thing (Foo bool -> Bar):
-> should_log;
if (should_log):
dup log_foo
foo_to_bar
if (should_log):
dup log_bar