r/programming • • Dec 22 '11

The Problem with Implicit Scoping in CoffeeScript

http://lucumr.pocoo.org/2011/12/22/implicit-scoping-in-coffeescript/
83 Upvotes

116 comments sorted by

View all comments

Show parent comment

1

u/mitsuhiko Dec 23 '11

The line that I would have eliminated is this:

I had a deg2rad function in there as well and I did not want to patch it on Math so I decided to import them all as functions to make them more uniform.

1

u/showellshowell Dec 23 '11

I guess I understand your reasoning, but I would have kept the four functions in the Math namespace. This way, readers would be able to distinguish standard library functions from home-grown helpers. If I see Math.log, I don't have to look upward in the code to see where it comes from.

How long was the file?