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

Calculator Question #153

Closed
browner12 opened this issue Jan 30, 2016 · 4 comments
Closed

Calculator Question #153

browner12 opened this issue Jan 30, 2016 · 4 comments

Comments

@browner12
Copy link

About a year ago I submitted a proposal to the PHP League of my implementation of a money package. I got good feedback from both @mathiasverraes and @sagikazarmark. I had proposed separating responsibilities out into both a Money class and an Accountant class. You both argued that money should inherently know how to do math on itself, and that an Accountant was unnecessary. Now as I look at your nextrelease branch of your money package I see that you guys have created Calculators, which I believe is exactly what I was proposing. I'd love to talk with you guys a bit about what made you change your minds on this issue.

Thanks!

@frederikbosch
Copy link
Member

@browner12 The Calculator class was made in order to support unlimited integer support (bigger than PHP_MAX_INT) through gmp and bc. See #111.

@frederikbosch
Copy link
Member

Reasoning and design decisions to be found with the PR at #115.

@sagikazarmark
Copy link
Collaborator

@browner12 I am not completely sure I remember what exactly your design was. But if I am correct, your "Calculators" were "outside" of the Money API. While our calculators are encapsulated into the Money object API. It is an internal detail which allow us to use various numeric value handling. Hope that answers your question.

@browner12
Copy link
Author

thanks @frederikbosch

yup, @sagikazarmark, that was it. mine was external rather than being a dependency of my Money. thanks for the reply.

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

3 participants