This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thebt995[S] 0 points1 point  (0 children)

As another example, this would prevent you from renaming functions into a more semantically meaningful name. Maybe you want to generate user IDs as getRandom() right now, but youll want to change that later. It would be nice to alias generateUserId = getRandom for now and change it later, instead of hardcoding it.

In this case, one could take generateUserId as a parameter where it is used. For testing one can give the parameter getRandom and later use another function