7 ms·
I do small projects statically all the time! Writing a simple bf interpreter can be done so statically that you don't even need to store the program in its own
by idealmedtech 4y ago
I do small projects statically all the time! Writing a simple bf interpreter can be done so statically that you don't even need to store the program in its own array; program text can just be taken directly as const char*
https://github.com/ijustlovemath/bfi https://github.com/ijustlovemath/bfi
You can also do ergonomically nice things using static allocation in many data structures, like linked lists (as a tiny example: https://github.com/ijustlovemath/linked-list/blob/master/ll.c#L102 https://github.com/ijustlovemath/linked-list/blob/master/ll....). That way you can focus on the concepts that matter; the data structures, and not frustrate newbies with opaque and difficult-to-reason allocation issues (at least not at first!)