
Learn JavaScript the Hard Way - mconintet
Learn JavaScript and Rust by writing a naive JavaScript  engine in Rust from scratch<p>https:&#x2F;&#x2F;github.com&#x2F;hsiaosiyuan0&#x2F;naive
======
bdcravens
Keep in mind that title is also the title of a book by Zed Shaw:

[https://learncodethehardway.org/javascript/](https://learncodethehardway.org/javascript/)

------
neilsimp1
I have a bit of an off-topic question for anybody who writes Rust.

I'm more familiar with web development and higher level languages, but I've
always been interested in Rust. While I know a bit of C/C++, I'm far from an
expert. One of the things that turns me off from those languages are the
frequent use of really short or cryptic variable/function names.

I'm looking at this codebase, specifically
[https://github.com/hsiaosiyuan0/naive/blob/master/src/lib/to...](https://github.com/hsiaosiyuan0/naive/blob/master/src/lib/token.rs),
and I see stuff like `let (s, kv, vk, be) = gen_map!`. I have no clue what
those variables would be unless I dug around the rest of the file.

Is this sort of variable/method naming convention common in the Rust world? I
am not criticizing the author or the language here, merely just curious what I
should expect if I dipped my toes into Rust.

~~~
steveklabnik
It depends; Rust is more concise than many languages, but it’s not always that
concise. They are in this case because they’re only used once, below the match
statement, and are abbreviated forms of the things they’re being assigned to.

Type variables and lifetime names are often only one letter, though.

------
afarrell
Might this be better named "rebuilding javascript" in the style of
[https://rebuilding-rails.com/](https://rebuilding-rails.com/)?

