HackerLangs
TopNewTrendsCommentsPastAskShowJobs

etyp

no profile record

comments

etyp
·6 месяцев назад·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
·6 месяцев назад·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
·7 месяцев назад·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
·7 месяцев назад·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
·7 месяцев назад·discuss
is ,AOE too far?
etyp
·8 месяцев назад·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
·10 месяцев назад·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 ;)