Hacker News new | ask | show | jobs
by mamcx 4399 days ago
I start writing a ORM (that is how I learn a new language). Very fast I hit problems. The keynote and the state of union say swift is ready for production, but is not there yet. The coding experience is buggy, the repl violate the language (is possible to change a constant to another type!), the importing of other obj-c code is sometimes broken (ie: Not work at all, or yes). A lot of things are not documented (For example, how do a generator?), etc

Still, I hope this lang mature and be popular, because I want badly to not use obj-c

2 comments

Can you provide more details? All of the issues you mention seem like typical early beta expectations.
Other issues is for example, how import code into a playground:

https://devforums.apple.com/thread/227949?tstart=0

and when importing obj-c code https://devforums.apple.com/message/972445#972445 it suddenly can't refer to them.

How much is this about xcode or the language is something I don't know.

The thing is, I'm a avid supported of alternate languages. When everyone use VB, I use FoxPro. When is C, I use Delphi. I get iOS instead of Android, and python instead of php.

But with swift I hit in less than half a hour several crashes & weird behaviour (not just: i don't know how use this lang) that I rarely experiment when use other langs.

But: I still continue with this, because the lang -despite the flaws (no exceptions? why ...? and other stuff) seem enjoyable.

Some of the issues are in https://devforums.apple.com/community/tools/languages/swift

For example, when the REPL is invoked with /Applications/Xcode6-Beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift, is possible to write:

let a= 1

This create a constant integer. According to the docs, is a constant and can't change.

However, you can write:

a=2

And it work. But if is write in XCode it show that that is a error

Why the downvote?
Maybe because neither the keynote not the state of union said swift is ready for production.
Do you see the videos? They expect to get apps made with swift on launch of iOS 8, and have rewrite at least the WWDC videos app as showcase.

P.D: This remark was about 32 min in the state of union video

The launch of iOS is several months in the future.

Swift, as XCode 6, is still beta.

Yep, but in terms of languages, that is around the corner!
No idea why someone would have downvoted you. Your post was the first one that has given me insight into what it's actually like to work with the language at this early stage.
grammar maybe?