Hi everyone, I was working on my school programming language research course with Swift, for basic syntax and language philosophy it is great but lacking of some an official support on basic things like File I/O and I need to search on SO or Google it to get an answer.
For some basic programming features like File I/O, console read line, or linking, will they be considered included in the documentation?
Thanks for sharing, I am very new to Swift development. especially non-iOS, the reason I raised the question was because after some googling for the answer, it was either Bundle.main.url() or Bundle.module.url() to access the Sources/Resources directory, and later find out about the FileManager API, and now I see the FileHandler let me have a look
Honestly I do much more Linux/MacOS than iOS so I try to write packages that will work both in an apps bundle or the CWD.
Are you trying to mostly access included files or work with external files?
What OS's are you targeting?
FWIW, the folks working on FileManager and SwiftNIO are huge heroes in my book for even thinking about an API that will work with a non POSIX system! I'm way too lazy so using those libraries are a very good solution.
Also - if you want to see some pretty pro file handling using So. Many. Frameworks....
Hi there, currently I am only doing it for a school assignment therefore it is include files or just within the project root.
For OS i assume crossed platforms because the professor might run on his windows machine, of course I don't see there is a chance of that but let's assume all 3 major OS
thanks for sharing the resources I'll have a look at it
It is. It is the only way for the language to grow and flourish. There are a lot of good choices present in Swift’s design. It’d be a shame to delegate it as just an Apple programming language.
The feedback from beginners is super valuable and welcome. There are a lot of areas lacking[1]. Yet still I wouldn’t want to discourage anyone from trying out Swift.
As for cross-platform support… There are a lot of people working on it, and it is getting better steadily. Although myself, I feel pretty comfortable recommending Swift for making Linux or even Windows binaries.
If there are any frustrations you encounter feel free to reach out. It would help bring these issues to our attention.
Also, why is JS catching strays here? That seems reductive
And also I remember Apple wants Swift to be a system programming language not just building mobile apps.
As tsoding pointed out the interoperability with C is surprisingly good but no public or clear documentation on that.
So far I am enjoying Swift a lot, even learnt to use TabularData and telling people who are on Windows to try it out, if we want to see Swift one day will be as widely used as Java, some of obvious topics like file system should be mentioned.
Again thanks for the team behind it, great language just lots of keywords
I do remember that. I wish I wasn’t so lazy, and elevated criticisms brought forward to the larger Swift community right when the stream aired. Oh well.
#include <stdlib.h>
I often find myself “writing C in Swift” just because I don’t know nor want to look up the blessed swift-specific way of doing things. It works surprisingly well[1]