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

[BUG] Too many attribute aliase names in Plots API. They should be dropped or allow max 1 alias per attribute. #4613

Closed
EldarAgalarov opened this issue Jan 1, 2023 · 4 comments

Comments

@EldarAgalarov
Copy link

There are too many attribute aliases in Plots API. For what? API should be clean and simple as possible.

Just need to pick one good, clean and short-as-possible attribute name.
Rest aliases should be deprecated/dropped as they making code reading harder and harder to remember they all.
As compromise maximum 1 alias name should be allowed.

@BioTurboNick
Copy link
Member

Can you justify why this is a bug to you? Having flexible choices to minimize documentation lookup is part of the design philosophy of Plots.

@EldarAgalarov
Copy link
Author

EldarAgalarov commented Jan 1, 2023

Having flexible choices to minimize documentation lookup is part of the design philosophy of Plots.

How having zillion of aliases can minimize documentation lookup? Maybe opposite - it maximizes documentation lookup? Having one name I must remember just one name, having multiple names, I should always go to documentation and look what this attribute name means if I see it first time.

Following your logic, why do not make aliases for functions too? They aren't worse than attributes. For example let's make aliases for plot function: draw_plot, draw_chart, chartdraw, chart_draw, do_plot, do_chart, etc :)

@BioTurboNick
Copy link
Member

BioTurboNick commented Jan 1, 2023

Having flexible choices to minimize documentation lookup is part of the design philosophy of Plots.

How having zillion of aliases can minimize documentation lookup? Maybe opposite - it maximizes documentation lookup? Having one name I must remember just one name, having multiple names, I should always go to documentation and look what this attribute name means if I see it first time.

It's meant for writing quickly and interactively, not reading. There is a canonical variant for each argument that is recommended for API use.

And there are shorthands for other plot calls. xlims! for plot!(xlims = ), for example, or scatter for plot(seriestype = :scatter).

@BioTurboNick
Copy link
Member

Playing Devil's Advocate for a moment -

Would it be a good idea to have an overlay module that provides the convenience arguments and functions, which could be excluded if desired? Or automatically imported only in a REPL context, so that non-interactive uses are prodded towards a uniform API?

@t-bltg t-bltg closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants