Should I include utility functions in the class?
Forum rules
Discuss Autohotkey related topics here. Not a place to share code.
Discuss Autohotkey related topics here. Not a place to share code.
-
- Posts: 639
- Joined: 03 Dec 2018, 20:02
Should I include utility functions in the class?
For example, general utility functions like JSON, UrlDownloadToVar, etc. Should I include them in my class for easier distribution or should I leave them out of it for modularity? Or should I tell people to include these functions on their own?
Re: Should I include utility functions in the class?
I think what the AHK community prefers is that you don't pollute the global namespace. But they also don't want to download a separate file or script.
Re: Should I include utility functions in the class?
It is and endless discussion topic:
- read the license of your utilities, maybe a creator don't like you include its software embeded in other software.
- If you include source code, your piece of software will ever work. If you include a link to resources and the owner changes something in it, That change may broke your software.
- Think about third party updates: updates may fix bugs that you would like to incorporate into your software, so you need to update everything and maintain updated your class again.
- On the opposite side: Maybe you don't need to use the latest version of a utility, just because you don't use the new functions, or maybe the new version has grown too much and you are confortable with the old one... There are a lot of reason for using an old version versus the new one.
In my opinion, I will create a folder "third party" and include all files in my download, that way I ensure everything works out of the box.
Software that needs separate downloads dependencies are a kick on the stomach for every user.
There are always pros and cons, just evaluate.
- read the license of your utilities, maybe a creator don't like you include its software embeded in other software.
- If you include source code, your piece of software will ever work. If you include a link to resources and the owner changes something in it, That change may broke your software.
- Think about third party updates: updates may fix bugs that you would like to incorporate into your software, so you need to update everything and maintain updated your class again.
- On the opposite side: Maybe you don't need to use the latest version of a utility, just because you don't use the new functions, or maybe the new version has grown too much and you are confortable with the old one... There are a lot of reason for using an old version versus the new one.
In my opinion, I will create a folder "third party" and include all files in my download, that way I ensure everything works out of the box.
Software that needs separate downloads dependencies are a kick on the stomach for every user.
There are always pros and cons, just evaluate.
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 16 guests