On 2011-12-05 07:59, Nick Sabalausky wrote:
"Jacob Carlborg"<d...@me.com>  wrote in message
news:jbglgs$2no2$1...@digitalmars.com...

I think CoffeeScript works really well, it's been around a while and it's
the default way to handle JavaScript in Rails 3.1 and later versions (SASS
is the default way of handling CSS).

That seems slightly strange to me since Ruby is not an indent-syntax
langauge. I would have expected something like Django to be more likely to
standardize on on SASS/CoffeeScript.

I think they're good languages, regardless of the indent-syntax or not. CoffeeScript and Ruby share a couple of language features that I'm not sure if Python does:

* Instance variables start with @ (shortcut for "this." in CS)

* Functions can be called without parentheses (they have to take at least one argument in CS)

* Braces around hashes are optional
* No need to declare variables
* Existential operator
* Trailing if-statements

On the other hand, CoffeeScript and Python shares a couple of features as well:

* Indentations are used for scopes
* Array comprehension

I'm not very familiar with Python.

BTW, SASS comes with two syntaxes, SCSS and SASS. SCSS is a superset of CSS and uses braces for scope and semicolons, just as CSS. SASS uses indentation and no semicolons. SCSS is the default in Rails 3.1.

--
/Jacob Carlborg

Reply via email to