Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CoffeeScript for the Rubyist
Presenter: Mark Bates
Mark Bates is the founder and chief architect of the Boston, MA based consulting company, Meta42 Labs. Mark spends his days focusing on new application development and consulting for his clients. At night he writes books, raises kids, and occasionally he forms a band and “tries to make it”.
Always wanting to share his wisdom, or more correctly just wanting to hear the sound of his own voice, Mark has spoken at several high profile conferences, include RubyConf and jQueryConf. Mark has also taught classes on Ruby and Ruby on Rails. In 2009 Mark’s first (surprisingly not his last!) book, “Distributed Programming with Ruby”, was published by Addison-Wesley. In 2012 Addison-Wesley published Mark’s second book, “Programming in CoffeeScript”.
Mark lives just outside of Boston with his wife Rachel and their two sons, Dylan and Leo. Mark can be found on the web at: http://www.markbates.com, http://twitter.com/markbates, and http://github.com/markbates
In this talk we start with the basic concepts of CoffeeScript and move on to the more powerful and fun features of the language. While we're looking at CoffeeScript we'll see how it relates to the Ruby code we write everyday. What do Ruby 1.9 lambdas and CoffeeScript functions have in common? Which of the two languages supports splats, default arguments, and ranges? The answers may surprise you.
- Pretty basic; good overview of the history leading up to CoffeeScript and its syntax.
- If you're already pretty familiar with CoffeeScript, this session might not be for you.
Wrote Programming in CoffeeScript
- Brendan Eich
- Lisp like, turned into Java like
- Jeremy Ashkenas: made Backbone.js, made CoffeeScript to make that easier
Think of it like assembly
Overview of syntax rules (see the main CoffeeScript site)
- He always uses parens
- C'mon, use indentation
console?.logfor IE :)
Scoping issues (local variables inherit scope of the closure)
Transitioning to CoffeeScript
- or over time
- But what about all the JS you already have? @benjaminoakes