Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there anything like CoffeeScript for PHP?

PHP interpreters are very common, but the PHP syntax & libraries are inconsistent & cumbersome (IMO, of course). I think a language that compiles into PHP but provides higher level level features (like, modules, mixins, list comprehensions, etc...) and easier syntax (like optional semicolons, implied returns, no dollar sign for variables, optional brackets and braces, etc...) would be valuable. Does anything like this exist?

like image 905
retrodrone Avatar asked Jul 01 '11 17:07

retrodrone


People also ask

Is CoffeeScript obsolete?

As of today, January 2020, CoffeeScript is completely dead on the market (though the GitHub repository is still kind of alive).

Is CoffeeScript like JavaScript?

One crucial difference between the two languages is that TypeScript is the superset of JavaScript while CoffeeScript is a language which is an enhanced version of JavaScript. Not just these two languages but there are other languages such as Dart, Kotlin, etc. which can be compiled into JavaScript.

Is CoffeeScript a programming language?

CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability.

Is CoffeeScript similar to Python?

CoffeeScript is a programming language whose syntax is clearly designed to match much of Python (with additional inspirations from Perl, ECMAScript, Ruby, etc.). But most documentation for learning CoffeeScript assumes knowledge of JavaScript (which CoffeeScript compiles to), which is far messier.


1 Answers

I've been researching this a lot and at the moment it seems the answer is no. I'm the author of exactly such a project called Snowscript - it is far from complete, but the documentation is pretty good and some things do work. Would love to hear feedback of what you think about the syntax!

like image 166
Rune Kaagaard Avatar answered Sep 20 '22 23:09

Rune Kaagaard