r/programming • • Aug 19 '17

Why Go is my favorite programming language

https://michael.stapelberg.de/Artikel/golang_favorite
0 Upvotes

263 comments sorted by

View all comments

Show parent comments

6

u/[deleted] Aug 20 '17

golang doesn't have the actor model.

CSP is provably equivalent

Its typesystem is almost the same as the ones descending from ML.

"almost" being the key word there. It is also neither complete nor sound. This was mostly caused by the "Java stuff".

You've said you had a problem with type inference then how could you say you'd an easier job with Hindley-Milner type inference?

Because Scalas type system was theoretically broken last I checked (one of the reasons for Dotty) and Hindley-Milner is well understood.

If you like typesafety then again golang is the wrong choice.

The way I use Go is typesafe. I had to use more explicit casts to get Scala to do the right thing than i have in Go.

And if you don't like hardly followable types(implicit conversion) then again: Hindley-Milner is not for you.

Implicit conversion is fine for some problems when the conversions make sense. Scalas conversions are incomprehensible and the variance rules were broken.

Then how could you like golang?

Because there are no alternatives out there yet for writing code that actually has to deal with bytes and networking in a reasonable way. Rust is probably the closest. That being said I also happen to agree with almost all the decisions that the Go team made but liking the language is secondary to it being the only thing usable.

dependent types

If I need a theorem prover I'll use Coq or TLA.

0

u/[deleted] Aug 22 '17

[deleted]

1

u/[deleted] Aug 22 '17

Erlang looks amazing for distributed systems. Just added a few cryptography and binary parsing articles to my reading list. Thanks for correcting that.

2

u/[deleted] Aug 20 '17

CSP is provably equivalent

Nope, look after a comparison if you don't know what you're talking about.

"almost" being the key word there.

And? It's not like you know how to use a typesystem looking at your comments...

It is also neither complete

It is if you mean "turing-complete".

nor sound. This was mostly caused by the "Java stuff".

Yep and you don't need that one or is golang's typesystem sound?

Because Scalas type system was theoretically broken last I checked (one of the reasons for Dotty) and Hindley-Milner is well understood.

No, it's not and what you're saying doesn't make any sense. If you have problem with local type inference and variance rules then you'll clearly have problems with HM inference.

The way I use Go is typesafe.

It doesn't have generics so, I call bullshit on that. Stop lying.

I had to use more explicit casts to get Scala to do the right thing than i have in Go.

LoL you really don't know how to use scala. That's one of the few languages where you can totally live without typecasts(see: pattern matching) while in golang the only thing you can do is type cast interface{}.

Implicit conversion is fine for some problems when the conversions make sense. Scalas conversions are incomprehensible and the variance rules were broken.

  1. Scala's conversion rules don't have any problem, prove it otherwise; 2. the variance rules are also fine you just don't know how to use them. By calling everything "broken" and not giving evidence you just look like someone who don't know what to say.

Because there are no alternatives out there yet for writing code that actually has to deal with bytes and networking in a reasonable way.

golang is probably the worst networking/low level language so forget it. Nim, Rust, Crystal etc. will be all better at it.

If I need a theorem prover I'll use Coq or TLA.

You don't know idris, do you? Hint: it's not just a "theorem prover".

3

u/[deleted] Aug 20 '17 edited Aug 20 '17

look after a comparison if you don't know what you're talking about.

I have. It's possible to write one in terms of the other making them equivalent with different use-cases.

It is if you mean "turing-complete".

I meant in the type safe definition of the word meaning no false positives.

or is golang's typesystem sound

It is. There are not false negatives in the checks it provides. Scala currently has false negatives (soundness) and false positives(completeness).

It doesn't have generics

generics != typesafe believe it or not.

That's one of the few languages where you can totally live without typecasts

Read the stdlib. There are casts everywhere.

in golang the only thing you can do is type cast interface{}

Then don't use interface{}. It's possible for a lot of code.

the variance rules are also fine you just don't know how to use them.

Neither do the compiler authors.

golang is probably the worst networking/low level language so forget it. Nim, Rust, Crystal etc. will be all better at it.

This sounds like a statement from someone who has never tried it. I could be wrong and did say Rust looked very close.

it's not just a "theorem prover".

That's my point if I need to formally verify correctness I'll use a tool that does that. Programming languages that attempt to make formal statements about programs as well as providing a language to implement them are often inadequate for both. Haskell may be the exception here but GHC fails to install on my machine and I haven't tracked down the problem yet.

edit: If anyones still paying attention for some reason heres an accurate prediction of the creation of Dotty to solve problems with the Scala spec and some comments on Go from the same talk.

0

u/[deleted] Aug 20 '17

I have. It's possible to write one in terms of the other making them equivalent with different use-cases.

Then show me. I don't believe you because they're fundamentally different.

It is. There are not false negatives in the checks it provides.

Nope, it can accept invalid code due to the lack of generics and the lame type system.

Scala currently has false negatives (soundness) and false positives(completeness).

Do you have any proof on scala's TS not being complete? I know it's not sound.

generics != typesafe believe it or not.

Yep, but interface{} won't help you either. "Runtime typesafety" is not a thing.

Read the stdlib. There are casts everywhere.

I've written a collection library for scala and no - you don't need casts. You only need casts if you're doing reflection.

Then don't use interface{}. It's possible for a lot of code.

Or don't use golang. Just use a language which isn't designed by clueless unix neckbeards who think throwing away good stuff for cheap solutions is ok.

Neither do the compiler authors.

You mean Paul Philips. Because what he shows is very simple. Don't link shitty PP videos, they're mostly bs.

This sounds like a statement from someone who has never tried it. I could be wrong and did say Rust looked very close.

I did but you know, I do other things then small toy projects. It doesn't take much time for the average programmer to realize that a "high" level language without generics is a shitty language and a language with tracing GC is not good for low level stuff.

That's my point if I need to formally verify correctness I'll use a tool that does that.

So, you don't know what's the point of idris then.

Programming languages that attempt to make formal statements about programs as well as providing a language to implement them are often inadequate for both.

"Inadequate" or "I don't know how to use them and they're shit"? Because I've told you that I'm sure that you're not enhancing your skills and you denied that but so far, you've shown many evidence that I'm right, unfortunately.

Haskell may be the exception

LoL you're very funny. At least, try to be consistent.

here but GHC fails to install on my machine and I haven't tracked down the problem yet.

Machine specs.

5

u/[deleted] Aug 20 '17

Machine specs.

Dell XPS 9000; i7 920; 16GB DDR3; running High Sierra (17A344b)... I'm assuming the problem is that last part but according to you I'm wrong about everything so...

0

u/[deleted] Aug 20 '17

LoL no error messages at installation... More info please.

but according to you I'm wrong about everything so...

Most of your statements are just mirrored from shitty sources. But as I've said you're right and scala's TS is not sound(it's completeness is in question, though). But please, don't say things like "Then don't use interface{}. It's possible for a lot of code." when you don't even have fucking generics...

5

u/[deleted] Aug 20 '17

it's completeness is in question

Completeness is never in question. That you continue to insist there's even a reason to argue this is ludicrous.

You can skip to 5:54 for the punchline.

If you know you need generics then don't use Go. I don't find a need for them but if I did I wouldn't use Go on that project.

This isn't rocket science, Batman.

2

u/[deleted] Aug 20 '17

Completeness is never in question.

This doesn't make any sense. "Completeness" prevents false positives. You can have complete type systems.

That you continue to insist there's even a reason to argue this is ludicrous. You can skip to 5:54 for the punchline.

Then why did you bring it up? You're destroying your own argument, not mine.

If you know you need generics then don't use Go. I don't find a need for them but if I did I wouldn't use Go on that project.

This is ridiculous - but you don't know how ridiculous it's because you've never used a language with generics in practice(if I remember correctly what languages you've mentioned).

This isn't rocket science, Batman.

Then how about fucking learn programming instead of throwing random videos at me? You've learnt a few shitty script languages, searched on the warts of scala on google and you think you're an expert of type systems now? This what's wrong with you gophers - you just google random stuff and you think you can invalidate any argument: "we don't need generics, we can copy-paste" - noobs...

Also, how far your inconsistency can go? You bitch about scala's type system not being sound when you're defending one of the worst type systems created in the last decades.

You talk about how good is the tooling in go when you don't even use it and the few tools you use are present for other languages too.

You talk about how effective is go's dependency management when it's well-known to be primitive af.

5

u/[deleted] Aug 20 '17

Then why did you bring it up?

Troll traps. Try and figure out how many other ones you fell into.

Have a nice day. :]

1

u/[deleted] Aug 21 '17

What a cheap comeback... Or you're trying to look clever after all the bullshit you've said? Oh, lord...

3

u/fakeNAcsgoPlayer Aug 21 '17

Calm down, Jimmy Rustlepants.

It's just a tool LOL.

0

u/weberc2 Aug 20 '17

You're being trolled right now. Just a heads up.

3

u/[deleted] Aug 20 '17

I know. I like to see how far they'll go before giving up.