G
Gully Foyle
Would it be easier to create a ruby to objective-c translator than it is
to create a ruby compiler? Given the following, it appears it might be
easier to do this than converting ruby to pure c or c++.
Support for blocks in Objective-C described here (its been tested with
POCS, not sure how many other compilers support this):
http://users.pandora.be/stes/block98/index.html
And here's a short description of Objective-C from
http://www.dekorte.com/Objective-C/
C-based
Unlike C++, Objective-C is a true superset of C.
Dynamic
Objective-C is dynamicaly typed so class libraries are much
easier to deal with than in C++. The Objective-C run-time allows you to
access methods and classes by their string names, as well as do dynamic
linking and addition of classes and categories at runtime.
Simple
Unlike C++, Objective-C only extends the C language to support
Smalltalk like OO features without any extra functional-programming baggage.
Elegant
Objective-C supports dynamic binding and has a messaging syntax
like SmallTalk's.
Example:
[myColor setRed:0.0 green:0.5 blue:1.0];
Fast
Objective-C performs dynamicaly bound message calls very quickly
(about 1.5-2.0 times as long as a C function call).
to create a ruby compiler? Given the following, it appears it might be
easier to do this than converting ruby to pure c or c++.
Support for blocks in Objective-C described here (its been tested with
POCS, not sure how many other compilers support this):
http://users.pandora.be/stes/block98/index.html
And here's a short description of Objective-C from
http://www.dekorte.com/Objective-C/
C-based
Unlike C++, Objective-C is a true superset of C.
Dynamic
Objective-C is dynamicaly typed so class libraries are much
easier to deal with than in C++. The Objective-C run-time allows you to
access methods and classes by their string names, as well as do dynamic
linking and addition of classes and categories at runtime.
Simple
Unlike C++, Objective-C only extends the C language to support
Smalltalk like OO features without any extra functional-programming baggage.
Elegant
Objective-C supports dynamic binding and has a messaging syntax
like SmallTalk's.
Example:
[myColor setRed:0.0 green:0.5 blue:1.0];
Fast
Objective-C performs dynamicaly bound message calls very quickly
(about 1.5-2.0 times as long as a C function call).