[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is Swift the language that Go should have been /g/?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 44
Thread images: 2

File: Swift_logo.svg.png (104KB, 2000x1800px) Image search: [Google]
Swift_logo.svg.png
104KB, 2000x1800px
Is Swift the language that Go should have been /g/?
>>
>>59919990
Not really, but it is objectively better than Go in pretty much every way.
>>
>>59919990
most underrated language of the last decade
its pretty much native c#, and its fucking awesome at least from my small experience with it
>>
>>59919990
No, Crystal is the language that golang should have been.
Not necessarily by syntax or even in all semantical concepts, but in what is included.
>>
>>59920596
still no windows support
>>
>>59920356
google "swift read file by line"
the examples convinced me that swift is pure shit.
>>
>>59919990
Yes. It has all the modern features and isn't retarded like Go.
>>
>>59919990
No native concurrency
>>
>>59921052
hello pajeet.

let lines = contents.components(separatedBy: "\n")
for line in lines {
let words = line.components(separatedBy: " ")
print("\(words[0]) is \(words[1]) and likes \(words[4])")
}
>>
>>59921052
you're an idiot. stick to java.
>>
If you could use Switch to make Mac/iOS apps without having to interface with a thousand legacy NS* Objective-C libraries it'd be great.
>>
>>59921031
and the problem is what exactly?
>>
I've used both.

Go is a much better language.

t. Someone who has a degree in C
>>
>>59920026
I C what you did there.
>>
>>59921171
>Degree in C

Quality education
>>
Redpill me on switch
Why use it instead of c+++
>>
>>59921171
>degree in C
kek
>>
Apple did something good?
>>
>>59921440
It's Mainstream (top 10 on Pypl), and it has algebraic data types.
>>
>>59921111
>contents

now where does it come from, retard?
>>
>>59921130
python
with open(fname) as f:
content = f.readlines()
# you may also want to remove whitespace characters like `\n` at the end of each line
content = [x.strip() for x in content]

ruby
File.readlines('foo').each do |line|

swift
https://gist.github.com/algal/23b10062a558aec7679e4c854096f88e

java is another stupid example when you need IO stream and shit.
>>
>>59921647
>swift
but that's juts wrong you stupid retard. go scroll up.

like I said, stick to fucking java... and poo in the loo.
>>
>>59921730
Are you brain dead?

That "scroll up" example is about splitting string by delimiter.
>>
>>59919990
is it useful anywhere outside apple's walled garden?
>>
>>59923795
>is it useful anywhere outside apple's walled garden?
Of course. IBM wrote millions of lines of code in Swift for their servers.
>>
Swift was probably the only time I've ever had fun programming for an iOS device.
>>
>>59923869
looks like you're right
thanks anon, didn't know about that
>>
>>59921604
do {
let contents = try String(contentsOfFile: "/path/to/file");
}
catch let error {

}
>>
File: 1463177059333.jpg (103KB, 1024x1152px) Image search: [Google]
1463177059333.jpg
103KB, 1024x1152px
>>59923948
Yeah, IBM is moving everything over to Swift now. They used to be big on Java but now they're branching out.

https://realm.io/news/tryswift-chris-robert-end-to-end-application-development-swift-backend/

Pic related.
>>
>>59921031
good, this keeps the plebs out
With 1.0 they will have that soon enough anyway.
>>
>>59924073
> benchmarksgames
>>
>>59924675
this
Anyone who takes that plebian shit serious...
>>
>>59924063
>>59921111
I really like how all arguments in Swift are named. It's one thing Obj-C got right.
>>
>>59919990
I need my C for loop
>>
>>59921031
>>59920596
And no support for building shared libraries.
>>
>>59924771
Good, I'll never see "YourDevWasALazyFag.dll is missing, please install it." messages again.
>>
>>59924813
They still plan on having a code loading/plugin mechanism, just a language-specific one. So you could still see "YourDevWasALazyFag.totally_not_a_dll is missing". On the other hand, you won't be able to write plugins in Crystal for existing applications with a API C without manually creating a C shim.
>>
>>59924933
That actually sounds good.
The C ABI is limited garbage and really shouldn't be encouraged to be used except for extreme cases, like hard realtime stuff and if A wants B to use As plugin API he better delivers some kind of workaround framework like for example I believe Qt does.
>>
>>59925086
Ideally, they should have both.
>>
>>59924933
>YourDevWasALazyFag.fusion
>>
>>59925109
Nah, that just encourages people to create bindings for shitty scripting languages in which they then attempt to write actual applications.
>>
>>59925156
You misunderstand me. You can already use shitty scripting languages all you want in a Crystal program because you can load C shared libraries. Crystal is designed to make it easy to use C libraries. What you can not do is write a shared library in Crystal to extend a shitty scripting language with.
>>
>>59919990
Go is the language Swift should have been.
>>
>>59927316
Thoughtless inversion.
Thread posts: 44
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.