Hacker News new | past | comments | ask | show | jobs | submit login

I usually use bash or ruby to do scripting, but I think is a good idea to use the power of Swift to this task.



Yeah, I’m actually surprised Apple hasn’t made a play for this from day 1 since developing iOS/OS X often leads to writing/maintaining a bunch of home-made or 3rd-party scripts (usually in Ruby), making app development require not only knowing Objective-C & Cocoa but also some scripting language. After all if Swift is all about making it easier for more people to build apps more easily, this seems like a worthwhile use-case to go after.


The Swift standard library is not yet up to snuff for that, you still need to know Cocoa to do basically anything high-level. Thankfully I know Foundation better than I do straight-up POSIX, so that's tenable for me, but it's not for most people who want something script-y.


Not only that, but you also need to know the hocus pocus to bridge between (Obj)C and Swift. And let's not forget that the Cocoa header files are browsable, thus enabling “discoverability”, while Swift is completely obscure in that respect.


>Yeah, I’m actually surprised Apple hasn’t made a play for this from day 1 since developing iOS/OS X often leads to writing/maintaining a bunch of home-made or 3rd-party scripts (usually in Ruby), making app development require not only knowing Objective-C & Cocoa but also some scripting language.

Define "often".

Besides, Swift wasn't even that ready for application develoment from day 1.


I recently used someones template tool to generate some methods in Swift but with some erb-like syntax to actual Swift code.

It was actually more pleasant than I thought, and I usually use Ruby for this. Might do this more often in the future.

But Ruby still has the benefit with gem install that can get you anything from a twitter client to an IRC-bot lib.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: