News for hackers. Stuff that matters.
Re:What I Like About PHP by tiglionabbit on Tuesday December 09, 2014 @08:20PM (#8727103)
I'm a programming language geek, a code lover and a syntax fanatic. And there are a ton of things I love about coffee-script:

    class Animal # yeah! real classes!
      hello: (name="nobody") -> # nice default variables
       console.log "hi #{name}" # sexy variable expansion!

    class Dog extends Animal # logical syntax :)
     ...

    f = ->
     x=123 # variables are local by default and need no initialisation
Re:What I Like About PHP by xyby on Tuesday December 09, 2014 @08:31PM (#8727153)
CoffeeScript is interesting. So far I did not experiment with it too much. So I'm not sure if I would like to do work in it.

On one hand, it looks nicely terse. On the other hand it looks a bit cryptic.

The thing that stops me from trying it for a project is not the language, but the available environments. Having an additional compliation step adds complexity to the system and the workflow.

One thing I cannot resist to say is that to me "hello $name" is sexier then "hello #{name}" :)

Re:What I Like About PHP by tiglionabbit on Tuesday December 09, 2014 @08:53PM (#8727234)
Well sure, but you can put arbitrary expressions in the #{} syntax. PHP has a similar syntax for that.

I just run `coffee -wc .` on my source directory and pretend I'm using JavaScript everywhere else.