2 ms·
To take a simple example, I'm looking forward to doing things like `map` and `filter` on a collection in Julia mostly-efficiently, utilizing closures. While the
by sdegutis 13y ago
To take a simple example, I'm looking forward to doing things like `map` and `filter` on a collection in Julia mostly-efficiently, utilizing closures. While the same effect can be achieved in C, it's not pleasant to work with and can be more error-prone.
- mikeash 13y agoThat makes some sense, but seems to have nothing whatsoever to do with "bouncing between C and Objective-C".
- sdegutis 13y agoYou're right, there's a missing piece to this that I haven't expressed yet. I can see it in my mind, but I'm having trouble figuring out how to communicate it verbally.
- sdegutis 13y agoI think I was conflating a few things. One of the problems I was remembering was how difficult and inflexible it is to write a fast and efficient AST in C and export it to a scripting language intact. The only viable way that I could think of was to convert the C struct to an Objective-C graph and export it to whatever scripting language via some bridging, such as JavaScriptCore.framework (ugh JSExport) or maybe MacRuby, or similar. But writing the AST in Julia itself might very well solve the fast/efficient problem, and since it's a dynamic language, scripting comes for free, with a first-class AST. Another problem was how I couldn't mix Objective-C and C semantics when writing my AST. If I wanted to represent a collection in my AST, I had to basically hand-roll all the methods in NSMutableArray myself. So ultimately I'm not sure I expressed myself properly, but I'm still excited about diving into Julia as a scripting language. I really believe it could solve this kind of problem. I can imagine new platforms being built with very little supporting platform-specific code which exports a few building block APIs to Julia and lets the script to the rest.