Damus
binkle profile picture
binkle
@binkle
Just realized I can write macros which export values into the caller's scope based on potentially-compile-time-generated code :niggapoggers:

the following compiles and prints the right value:

ExpandInsertTest :: () #expand {
#insert "`quasimorph :: 15;";
}

main :: () {
ExpandInsertTest();
print("quasimorph = %\n", quasimorph);
}
1
๐Ÿ‘๏ธ๐Ÿต · 14w
nostr:nprofile1qy2hwumn8ghj7un9d3shjtnyd968gmewwp6kyqpqkdyzl44h6mhyl4djtf20w0t7avsy09umshq2k2czjf62ps774phqjy87ru Is that Blow's language? what is the :: used for in this context? Is it a compile time definitional operator of some sort?