Skip to content

Instantly share code, notes, and snippets.

@wbrady
Created October 24, 2013 14:47
Show Gist options
  • Save wbrady/7138602 to your computer and use it in GitHub Desktop.
Save wbrady/7138602 to your computer and use it in GitHub Desktop.
Why I hate coffeescript
featureMap = this.model.get('provider_feature_map')
$('.feature-row').each(->
featureCode = $(this).data('code')
$('input', this).each(->
bookingMapCode = $(this).data('code')
featureMap[featureCode][bookingMapCode] = $(this).is(':checked') # this loop will only run until this call returns false because of the implicit return and "eventedness" of javascript
)
)
featureMap = this.model.get('provider_feature_map')
$('.feature-row').each(->
featureCode = $(this).data('code')
$('input', this).each(->
bookingMapCode = $(this).data('code')
featureMap[featureCode][bookingMapCode] = $(this).is(':checked')
true
)
)
@tsnow
Copy link

tsnow commented Oct 24, 2013

This is an interesting argument. jashkenas/coffeescript#2477 (comment)

@tsnow
Copy link

tsnow commented Oct 24, 2013

And Coco might be considered for new dev work as well: https://github.com/satyr/coco#coco

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment