HaxeFoundation / HaxeFoundation/haxe.org-comments
[code.haxe.org] Other - Adding static methods to existing classes
Open
- Dominant language
- No language data
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Adding static methods to existing classes - Other - Haxe programming language cookbook
Haxe allows you to add static methods to existing classes (eg. Math) via the static extensions feature. The secret sauce is to specify the first parameter of the extension as Class where X is the class you want to add static methods to (eg. Math), and to make the method public.
[https://code.haxe.org/category/other/adding-static-methods-to-existing-classes.html](https://code.haxe.org/category/other/adding-static-methods-to-existing-classes.html)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.