Dropbox dives into CoffeeScript
Big, big fan of CoffeeScript and glad to see Dropbox hopping aboard.<p>That being said, some of their examples are lackluster.<p><pre><code>  @originalStyle = {}
  for k in ['top', 'left', 'width', 'height']
    @originalStyle[k] = @element.style[k]
</code></pre>
Should really be something like:<p><pre><code>  @originalStyle = ['top', 'left', 'width', 'height'].reduce (hash, position) -> 
    hash[position] = @element.style[position]
    hash
  , {}
</code></pre>
... though that shows off some CoffeeScript warts.<p>Also,<p><pre><code>  Sharing =
    init: (sf_info) ->
      for list in [sf_info.current, sf_info.past]
        for info in list
          @_decode_sort_key info
</code></pre>
Why aren't they using CoffeeScript classes?<p><pre><code>  class Sharing
    constructor: (sfInfo) ->
      ...</code></pre>