HackerLangs
TopNewTrendsCommentsPastAskShowJobs

etyp

no profile record

comments

etyp
·il y a 6 mois·discuss
To quote the very first paragraph of the bytecode interpreter section[1]:

> The style of interpretation it uses—walking the AST directly—is good enough for some real-world uses, but leaves a lot to be desired for a general-purpose scripting language.

Sometimes it's useful to teach progressively, using techniques that were used more often and aren't as much anymore, rather than firehosing a low-level bytecode at people.

[1] https://craftinginterpreters.com/a-bytecode-virtual-machine....
etyp
·il y a 6 mois·discuss
There is a chance that the title here was intentionally worded to answer a question people are likely to search for, then actually answer their concerns.
etyp
·il y a 7 mois·discuss
This is one of those natural consequences of "everything is an expression" languages that I really like! I like more explicit syntax like Zig's labelled blocks, but any of these are cool.

Try this out, you can actually (technically) assign a variable to `continue` like:

let x = continue;

Funnily enough, one of the few things that are definitely always a statement are `let` statements! Except, you also have `let` expressions, which are technically different, so I guess that's not really a difference at all.
etyp
·il y a 7 mois·discuss
Yeah I only found day 2, hopefully day 1 will appear though: https://www.youtube.com/watch?v=ZLRngpdV6Qg

(edited to not assume anything)
etyp
·il y a 7 mois·discuss
is ,AOE too far?
etyp
·il y a 8 mois·discuss
I read it as "this was a big news story which we care about. You may know it, but it is not the primary reason. Here is the primary reason."
etyp
·il y a 10 mois·discuss
Random note since Godbolt was mentioned: It's also fun to hop on play.rust-lang.org and see what different IRs look like via the "..." next to "RUN." Just look at how simple the HIR is pretty simple for "Hello world" - then check out the MIR ;)