gvwilson / sdxpy

Software Design by Example: a tool-based introduction with Python
https://third-bit.com/sdxpy/
Other
373 stars 55 forks source link

/func review #220

Closed gvwilson closed 1 year ago

gvwilson commented 1 year ago

Please review Chapter 8 https://third-bit.com/sdxpy/func/

cc @peter0083

peter0083 commented 1 year ago

will do!

peter0083 commented 1 year ago
The answer for the [%i "interpreter" %] of [%x interp %] is pretty easily"
but the answer for the little language it interprets is "not at all"

Extra quotation mark at the end of line 24?

https://github.com/gvwilson/sdxpy/blob/c48be48382c460d9f248bd3db4f073f7de08bca2/src/func/index.md?plain=1#L24

peter0083 commented 1 year ago
It has a name,
a (possibly empty) list of parameters,
and a body,
which in this case is a single [%i "statement" %].

missing a comma after "which in this case"?

suggestion:

It has a name,
a (possibly empty) list of parameters,
and a body,
which in this case, is a single [%i "statement" %].

https://github.com/gvwilson/sdxpy/blob/c48be48382c460d9f248bd3db4f073f7de08bca2/src/func/index.md?plain=1#L45

peter0083 commented 1 year ago

https://third-bit.com/sdxpy/func/func.tll link https://third-bit.com/sdxpy/func/func.out link https://third-bit.com/sdxpy/func/inner.out link https://third-bit.com/sdxpy/func/closure.out link https://third-bit.com/sdxpy/func/closure_list.out link

on https://third-bit.com/sdxpy/func/ page lead to a 404.

I guess all the non .py files cannot be accessed on the web page. not sure if that is intentional.

peter0083 commented 1 year ago

output from https://github.com/gvwilson/sdxpy/blob/c48be48382c460d9f248bd3db4f073f7de08bca2/src/func/oop.py#L15

and output shown in https://github.com/gvwilson/sdxpy/blob/c48be48382c460d9f248bd3db4f073f7de08bca2/src/func/oop.out#L2

are inconsistent. Not sure which you prefer.

peter0083 commented 1 year ago

https://github.com/gvwilson/sdxpy/blob/c48be48382c460d9f248bd3db4f073f7de08bca2/src/func/index.md?plain=1#L267

should it be (i.e., treats everything after the parameter list as an implicit "seq").?