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

Helpers should be static #910

Closed
davidmosterd opened this issue Sep 15, 2017 · 0 comments
Closed

Helpers should be static #910

davidmosterd opened this issue Sep 15, 2017 · 0 comments
Milestone

Comments

@davidmosterd
Copy link
Member

After reading: "It makes it obvious to users how the class is used" as an argument on static classes I think the helpers ought to be static.

It would rid us of the ac_helper() function and clean the syntax a little. Also, they don't allow a constructor and have no properties. It's not going to happen.

Should it happen; then the accessor ac_helper() should at least be removed as it couples behaviour of helpers very tightly. If you would want to write a Column Helper ever, which would benefit from an AC_Column object that would not be possible now.

AC_Helper_String::function
ac_helper()->string->function

We might even consider adding global scope function since those are helpers in general and there is no coherence between many functions.

ac_str_word_count()
ac_array_key_replace()

@tobiasschutter tobiasschutter added this to the 5.0 milestone Nov 24, 2017
@DGStefan DGStefan closed this as completed Nov 6, 2019
@DGStefan DGStefan modified the milestones: 5.0, Closed Nov 6, 2019
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

3 participants