kanaka / mal

mal - Make a Lisp
Other
10.11k stars 2.57k forks source link

Hash-map literal reader syntax never introduced #452

Open rjtobin opened 5 years ago

rjtobin commented 5 years ago

Small omission in the guide: it is implied in step 9 that a {} literal should be parsed as a hash-map in the reader, but this is never explicitly stated earlier on. The sentence in question is: "This is basically the functional form of the {} reader literal syntax".

kanaka commented 5 years ago

Handling of hash-map literals in the reader is described in the deferrable section of step 1. Are you wanting something more? Would you like to send a PR with the change(s) that you think would clarify this?

rjtobin commented 5 years ago

Thanks for the quick reply! I meant specifically the notion that {} represents a hash-map. Maybe this is still mentioned somewhere? I tried searching for every occurrence of { but couldn't find it. I'm happy to make a PR with a couple of additional sentences.

kanaka commented 5 years ago

@rjtobin oh, you're right! You're the first person to mention this. I think it quickly becomes obvious once you run any of the tests, but it does appear to be stated directly in the guide. I think the same problem applies to vectors.

Yes, please send me a PR. I'm in the home stretch of a PhD dissertation at the moment. I can give 30 seconds to sanity check a PR but all my writing mental energy is over allocated at the moment :-)

rjtobin commented 5 years ago

It's probably obvious to a Clojure person, but I was a little unsure. Anyway, I'll make the PR shortly. I'm finishing up a Zig implementation (Step9 is passing; just need to do Step A and some tidying), will hopefully make a PR for that soon too.

Good luck with the PhD writeup! I was in the same boat not too long ago.

dubek commented 5 years ago

wow, a first implementation in 'Z' ! Exciting!

kanaka commented 5 years ago

:+1: And then we'll just have three letters to go: 'Q', 'U', and 'X'. I suspect we'll hit 100 implementations before we cover the alphabet though.

asarhaddon commented 3 years ago

Some related questions…