TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

RubyMotion pros and cons

62 点作者 mattetti大约 13 年前

6 条评论

objclxt大约 13 年前
This is probably one of the better articles on RubyMotion: mainly in that it's fairly balanced...it annoys me to see posts like "Why Ruby Motion is Better than Objective-C", or "Ruby Motion: The Worst Thing to Happen to iOS"...<p>As an Objective-C developer who knows very little Ruby, this probably isn't for me. But I can't see how opening up iOS to a wider range of developers is a bad thing: personally, I'm an Objective-C fan, but I can see why people don't like it, and if you're at a start-up or a small team looking to get some app deployed and you don't want the hassle of learning Objective-C then this seems like a great alternative.<p>So like any language or environment there are pros (the REPL looks amazing) and cons (closed source, at least in my view). And whilst I'm sure this wasn't the intention of RubyMotion at all it's actually making me revisit Ruby as an Objective-C developer and see if I can improve my knowledge and experience of it. No bad thing!
chrisdevereux大约 13 年前
<i>Even though ARC made memory management much easier for Objective-C developers, when using RubyMotion you don’t have to worry about memory (well at least not explicitly, don’t be dumb and create a bazillion objects and hold references to them either)</i><p>I'm not convinced about this. Here's a quote from the rubymotion runtime guide:<p><i>RubyMotion’s memory management system is designed to simplify the development process. Unlike traditional Objective-C programming, object references are automatically created and destroyed by the system. It is very similar to Objective-C’s ARC, in design, but it is differently implemented.</i><p><i>Object cycles, when two or more objects refer to each other, are currently not handled by the runtime, but will be in future releases.</i><p>There are a lot of things that look really cool about RubyMotion, but it doesn't seem to me that memory management is massively different to the situation in Objective-C with ARC on, or indeed C++ with smart pointers.<p>They haven't said how weak references are going to be handled, but it seems like the programmer will have to specify that a reference should be weak. In that case, the difficult part of memory management in a non-gc langage --- making sure you avoid either reference cycles, or inadvertently deallocating objects --- is still there in rubymotion.<p>(disclaimer: I haven't used rubymotion -- I'm just going on what's been published about it)
stcredzero大约 13 年前
<i>REPL/Interactive shell<p>RubyMotion doesn’t currently have a debugger, but it does have something Objective-C developers don’t have, a REPL working with the simulator. ... You can click on a visual element in the simulator and start modifying the objects in real time in a terminal window and see the modifications in the simulator. It reminds me of the first time I used firebug to edit the html/css of a web page and saw the changes in real time.</i><p>This might be the real strength of RubyMotion. Maybe someone should take Squeak/Pharo Smalltalk and create a utility that can be used as a REPL working with the iOS simulator. Smalltalk is basically Objective-C minus the C parts, types, and the glue to attach the C parts, so it would be the perfect REPL for the simulator. All you're left with is keywords and variables. Developers can insert this into projects for prototyping and debugging, but take it out when they deliver apps.
评论 #3929886 未加载
评论 #3929668 未加载
评论 #3930175 未加载
评论 #3929602 未加载
评论 #3929353 未加载
VeejayRampay大约 13 年前
Optionally typed Ruby would be interesting indeed.<p>Kind of wondering how that would work in practice though...
评论 #3929899 未加载
senthilnayagam大约 13 年前
bought it earlier today was able to get all sample apps running on the simulator in couple of minutes, lot eadier than getting started on objective C and xcode.<p>plan to spend time in weekend in getting some small project ported, will update
batista大约 13 年前
From the article:<p>"<i>Yesterday, RubyMotion was released and let’s be honest, it is the best alternative to Objective-C out there.</i><p>Really? Not so sure. How about Mono Touch? Not only it also compiles to native code, but it has a more mature IDE (MonoDevelop, with autocompletion), can use Interface Builder files, and has lots of apps done with it already in the Mac App Store. It's also able to target Android and Windows Phone, if you want. Oh, and it's been in use for far longer so a lot of bugs have been ironed out.
评论 #3930225 未加载
评论 #3930838 未加载