Join Slack
Powered by
why are many functions in the stdlib extension-fun...
# getting-started
f
Florian
07/08/2019, 8:51 PM
why are many functions in the stdlib extension-functions and not put directly into the corresponding class?
k
karelpeeters
07/08/2019, 8:54 PM
I do this too sometimes, if it doesn't need private state I just make it an extension functions.
karelpeeters
07/08/2019, 8:54 PM
But again, can you give a specific example?
t
tseisel
07/08/2019, 9:35 PM
This is the answer :
https://medium.com/@elizarov/extension-oriented-design-13f4f27deaee
t
thana
07/09/2019, 11:18 AM
well, first of all, many functions in the stdlib ware extensions to existing javaclasses - there wouldn't be another way to get all the useful methods into an .e.g
Set
f
Florian
07/09/2019, 2:08 PM
Thanks, I read the post
2
Views
Open in Slack
Previous
Next