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

Remove convenience functions (disk, circle, etc.) #29

Closed
dlfivefifty opened this issue Oct 15, 2018 · 6 comments
Closed

Remove convenience functions (disk, circle, etc.) #29

dlfivefifty opened this issue Oct 15, 2018 · 6 comments

Comments

@dlfivefifty
Copy link
Member

There are too many convenience functions, which goes against a good practice code design principle that there should only be one way to write anything (to make find-and-replace easier, etc.). I think all the lowercase convenience functions can be removed: UnitDisk is just as good as disk, etc.

@dlfivefifty
Copy link
Member Author

Ah, I see, they are used because the domains are mapped domains.

@dlfivefifty
Copy link
Member Author

Though I think my point is still correct: 2*UnitBall() is arguably clearer than ball(2).

@daanhb
Copy link
Member

daanhb commented Oct 16, 2018

In the absence of a type that stores a centre and radius, it seemed user-friendly to provide a routine that would return a domain that represents what the user wants. They are lower-cased because you can't predict which type they return. Right now they are indeed mapped domains. How about ball(radius=2)?
But I agree there shouldn't be too many of these.

@dlfivefifty
Copy link
Member Author

I think 2UnitBall() is pretty user friendly

@daanhb
Copy link
Member

daanhb commented Oct 16, 2018

I can live with that

@dlfivefifty
Copy link
Member Author

Some will need to stay for now: e.g. ellipse

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