Is Swift the language that Go should have been Sup Forums?

Is Swift the language that Go should have been Sup Forums?

Other urls found in this thread:

gist.github.com/algal/23b10062a558aec7679e4c854096f88e
realm.io/news/tryswift-chris-robert-end-to-end-application-development-swift-backend/
twitter.com/SFWRedditVideos

Not really, but it is objectively better than Go in pretty much every way.

most underrated language of the last decade
its pretty much native c#, and its fucking awesome at least from my small experience with it

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.

still no windows support

google "swift read file by line"
the examples convinced me that swift is pure shit.

Yes. It has all the modern features and isn't retarded like Go.

No native concurrency

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])")
}

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.

and the problem is what exactly?

I've used both.

Go is a much better language.

t. Someone who has a degree in C

I C what you did there.

>Degree in C

Quality education

Redpill me on switch
Why use it instead of c+++

>degree in C
kek

Apple did something good?

It's Mainstream (top 10 on Pypl), and it has algebraic data types.

>contents

now where does it come from, retard?

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
gist.github.com/algal/23b10062a558aec7679e4c854096f88e

java is another stupid example when you need IO stream and shit.

>swift
but that's juts wrong you stupid retard. go scroll up.

like I said, stick to fucking java... and poo in the loo.

Are you brain dead?

That "scroll up" example is about splitting string by delimiter.

is it useful anywhere outside apple's walled garden?

>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.

looks like you're right
thanks user, didn't know about that

do {
let contents = try String(contentsOfFile: "/path/to/file");
}
catch let error {

}

Yeah, IBM is moving everything over to Swift now. They used to be big on Java but now they're branching out.

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

Pic related.

good, this keeps the plebs out
With 1.0 they will have that soon enough anyway.

> benchmarksgames

this
Anyone who takes that plebian shit serious...

I really like how all arguments in Swift are named. It's one thing Obj-C got right.

I need my C for loop

And no support for building shared libraries.

Good, I'll never see "YourDevWasALazyFag.dll is missing, please install it." messages again.

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.

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.

Ideally, they should have both.

>YourDevWasALazyFag.fusion

Nah, that just encourages people to create bindings for shitty scripting languages in which they then attempt to write actual applications.

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.

Go is the language Swift should have been.

Thoughtless inversion.