Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is demo of reverse polish calculator too simple? #57

Open
xflcx1991 opened this issue Sep 24, 2018 · 2 comments
Open

Is demo of reverse polish calculator too simple? #57

xflcx1991 opened this issue Sep 24, 2018 · 2 comments

Comments

@xflcx1991
Copy link

xflcx1991 commented Sep 24, 2018

In Chapter "Packages",I'm afraid that demo of reverse polish calculator in exercises is too simple.The demo cann't resolve expression like this: 11+22*33*(2+5) .

Now I have completed a work to parse mathematical expression strings by double stack,just the classic “Reverse Polish Notation”.I hope you can accept this PR.

The comment in code is written by Chinese.Does it need to be English?

@miekg
Copy link
Owner

miekg commented Sep 24, 2018

Looked at your PR, but I'm afraid we need a balance between fully-working and a too long example (there are other really long examples in the doc though).

We could potentially flag this with a test function we add to the book and then leave this as an exercise to the reader (potentially putting the solution in the appendix) ?

WDYT?

@xflcx1991
Copy link
Author

xflcx1991 commented Sep 24, 2018

I think you are right.Beginners need simple and workable rather than complex.When someone knows “RPN”, he can write it in any language.

Just close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants