Re:I made a Phoenix webapp as a veteran Rails dev
by grzm on Sunday May 21, 2017 @04:19PM
(#14389043)
You've now altered a global object which other code may rely on. Indeed, you may overwrite someone else's Array#square method (or have yours overwritten). As a separate module, the additional code is logically distinct. You can find many discussions about monkey-patching elsewhere. It's not my intent here to argue one way or the other, just to answer your question as to why one may choose package the code as a separate module.
[ Parent
| on HN ]
There are no comments on this comment yet.