Does anybody find this Scheme code readable?
raw.githubusercontent.com
Does anybody find this Scheme code readable?
1–10 of 23 posts
Re: Does anybody find this Scheme code readable?
#21. That is badly written code. 2. I'm a bad programmer. 3. Scheme's syntax is ugly.
What do you think?
Re: Does anybody find this Scheme code readable?
#3I want to learn scheme but that is too much for me. So either 1. That is badly written code. 2. I'm a bad programmer. 3. Scheme's syntax is ugly. What do you think?
Re: Does anybody find this Scheme code readable?
#4Re: Does anybody find this Scheme code readable?
#5Re: Does anybody find this Scheme code readable?
#6But if the author's goal was maximum readability, they might have considered doing away with the abbreviations.
Re: Does anybody find this Scheme code readable?
#7I want to learn scheme but that is too much for me. So either 1. That is badly written code. 2. I'm a bad programmer. 3. Scheme's syntax is ugly. What do you think?
You're fooled on this because so many languages are so similar -- if you know C++, you can trivially read Java and C# and Python, and even languages that are a bit further afield like Javascript and Perl still are heavily influenced by C, so don't seem too odd.
But Scheme is a whole new family of languages. It's like being an English reader and looking at Greek text as opposed to Spanish. It's not that Greek is harder than Spanish, it's that Spanish is closer to what you already know.
Re: Does anybody find this Scheme code readable?
#8I want to learn scheme but that is too much for me. So either 1. That is badly written code. 2. I'm a bad programmer. 3. Scheme's syntax is ugly. What do you think?
Try it with an interpreter running.
Re: Does anybody find this Scheme code readable?
#9I want to learn scheme but that is too much for me. So either 1. That is badly written code. 2. I'm a bad programmer. 3. Scheme's syntax is ugly. What do you think?
I found it reasonably readable. The only criticism I had, offhand, was that the predicates like 'is-piece-knight?' were a bit verbose: the query mark at the end is understood to label a predicate, so the 'is-piece-' was redundant. I'd have written 'knight?' instead. That's pretty nit-picky though, and I don't think the current convention really detracts from its readability.
[1] If Lisp is So Great: http://paulgraham.com/iflisp.html
Re: Does anybody find this Scheme code readable?
#10If you're not using DrRacket, then please start using it. I learned what was then Scheme from SICP[2], but I've heard that the Little Schemer is perhaps a bit more approachable. Try starting with it[3].
[1] That moment when you realize it's been over fifteen years since you started college...Yeesh.
[2] https://en.wikipedia.org/wiki/Structure_and_Interpretation_o...
[3] http://stackoverflow.com/questions/13003850/little-schemer-a...