Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoffeScript'esque language for Objective-C?

Seeing what has been done for Java with Xtend and Mirah I can't help but think someone must be playing around with something similar for Objective-C or even C and C++ for that matter.

After some searching I've come up with nil. Is anyone aware of a CoffeeScript like Objective-C implementation?

Update: Good input so far from the two that have submitted answers, however wouldn't it be superior (realizing that that's a little subjective) to have an intermediate language that compiled directly to Obj-C precisely as per how CoffeScript works? Now, I'm not asking for CoffeeScript mind you, but rather some language that doesn't compile directly, but rather gives you a more readable top layer syntactically a la Xtend.

like image 228
ylluminate Avatar asked Aug 01 '12 21:08

ylluminate


People also ask

Do people still use CoffeeScript?

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

What is CoffeeScript 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. Specific additional features include list comprehension and destructuring assignment.

Is CoffeeScript like JavaScript?

CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.


2 Answers

Yes: Eero, which provides a somewhat Python-like syntax for Objective-C, implemented using a modified version of clang. (I haven't tried using it, though, so I can't comment on how useful it is!)

like image 59
Matthew Slattery Avatar answered Oct 05 '22 18:10

Matthew Slattery


MacRuby and RubyMotion let you code Mac and iOS applications (respectively) in pure Ruby. CoffeeScript is very Ruby-inspired, so if you enjoy that language, i think you'll feel at home with Ruby :)

Also, it is my understanding that both MacRuby and RubyMotion integrate nicely with the native environment; they don't run on a separate Ruby VM on top of Mac/iOS, so there is no big performance penalty and the native things are not that far away. So in that sense i think they are more similar in sipirt to Mirah for the JVM than to JRuby or Jython for example.

like image 26
epidemian Avatar answered Oct 05 '22 19:10

epidemian