4 ms·
Did you try Swift? It is conceptually and syntax wise very similar to Rust.
by terhechte 6y ago
Did you try Swift? It is conceptually and syntax wise very similar to Rust.
- the_duke 6y agoI did, and I think it's a great language in many ways. My biggest problem is that, as far as I know, it still is very much second/third class citizen on non-Apple platforms. With little signs from Apple that this will change. (Happy to be corrected here!) Other (more minor) complaints are the Objective-C baggage and the inheritance system - I enjoy the lack of inheritance in Rust.
- nicoburns 6y agoSwift does indeed hit a lot of the same sweet points as Rust whilst having automatic memory management and generally more user friendly defaults (at the cost of performance). Alas, it doesn't have anywhere near the library ecosystem that Rust has in most domains, and it's cross-platform support is also quite poor.
- ChrisMarshallNY 6y agoI'm a Swift programmer. I've also used plenty of other languages. I don't know enough about Rust to either sing its praises, or curse its name. I'm a bit leery to label Swift as a "systems language," as I feel that systems languages should be a wee bit closer to the bone (like ObjC); but that also means that I am not a fan of using systems languages to write application code. I wrote both levels in C and C++ for years, and HATED using those languages for app-level code. Swift, to me, is an almost ideal application language. But I don't write system code anymore, and have no desire to. I love writing app-level code, and love Swift. It's been a long time since I've had the pleasure of employing a language I actually like using.
- charrondev 6y agoMy understanding is as soon as you target on a non-Apple device, you lose a large chunk of the API (foundation). This includes things like file system interaction, date handling, sorting/filtering, networking and text processing. My understanding is there is some effort to provide a version that works outside of Apple OSes, but it’s incomplete https://github.com/apple/swift-corelibs-foundation/blob/master/Docs/Status.md https://github.com/apple/swift-corelibs-foundation/blob/mast.... If you are looking for static linking stdlib it looks like there’s still an open bug on Linux. https://bugs.swift.org/plugins/servlet/mobile#issue/SR-648 https://bugs.swift.org/plugins/servlet/mobile#issue/SR-648
- geoffpado 6y agoFWIW, as an iOS-centric programmer who’s also implemented a bunch of scripts and several moderate API projects in Swift/Linux, I haven’t found the OSS Foundation to be particularly lacking. The only quirk I can remember having to work around is the fact that for some reason, all the networking code (i.e., URLSession) is pulled out into a separate module, FoundationNetworking. FWIW, looking through that list you linked to, it seems most things are complete apart from relative edge cases (NSGeometry), fairly Apple-specific (Bundle), or replaced by something newer (NSCoder). The big one that jumps out to me as being a larger issue is the URL authentication stuff… so I guess steer clear if you need to handle basic auth/Kerberos/etc. The XML parsing being mostly incomplete is a bummer, too. :( Ultimately, though, I’ve found Swift on Linux to have everything I need for what I’ve been building with it. Obviously, YMMV, but (and not just for you, anyone else reading as well), I wouldn’t be scared off just because Foundation isn’t 100% complete. ### Edit: that being said, this is also just a defense/rebuttal to the comment I’m replying to. Swift isn’t the answer to all projects; I still reach for Clojure as my first choice for large API projects, mostly due to my own preferences.
- charrondev 6y agoIt’s been a while since I had checked, so I’m glad to see it’s filled out a lot more. It seems like the language evolution has slowed down a bit too. The last time I had given it was a little after the swift 3 release which had quite a lot of breaking changes. I let my previous experience here prevent me looking deep enough into it. I’ll have to give it another shot.