Go vs Haskell

which is the bigger meme language?

Attached: meme languages.png (896x669, 76K)

Other urls found in this thread:

docker.com/
kubernetes.io
syncthing.net/
github.com/influxdata/influxdb
twitter.com/SFWRedditGifs

julia

Haskell is at least being put together by competent people

There are plenty of things that are horrible with Go, but at least its a useable language unlike Haskell. Decent for small scripts and CLI's due to small binary size and quick startup.

They were created for different purposes

Go is a bit overly simple, but not a bad language by any means. It's a comfy C-style middle ground and the major issues have been acknowledged by the devs.

Haskell's ecosystem and learning curve make it torture to use for anything non-trivial compared to other functional languages. How the hell it took off instead of something like OCaml is beyond me.

At least Go is comfy

Think of Haskell less as a single language and more as a toolkit for implementing your own language features. That's why they have monads instead of plain old mutation: You can make up your own execution semantics and encode them in the type system without having to write an entire compiler.

Of course, if you do end up needing an entire compiler, that's when you want OCaml hackers.

>meme
Haha I saw the mems on the news too! Very funny

>Think of Haskell less as a single language and more as a toolkit for implementing your own language features. That's why they have monads instead of plain old mutation: You can make up your own execution semantics and encode them in the type system without having to write an entire compiler.
No, just no. If you try emulating mutable state with monads you end up with a system that doesn't support scopes or variable type checks at compile time. Just use Haskell for what it is, a cool programming language that makes you be explicit about your actions.

>If you try emulating mutable state with monads you end up with a system that doesn't support scopes or variable type checks at compile time.
Please, tell me more, because I have no idea what the fuck you're talking about.

Have you ever used Haskell?

Go is an extension of C

That's clear. That, or we're having a communication issue

If you use a state monad to implement yourself an opaque state system with scoped variable assignment (using a tree of variable lists for example) you won't get any static type checking for your operations. For instance, with

do
x

this retard doesn't know do notation is syntactic sugar for bind operators

Thanks for pointing out obvious shit, big boy

This. I don't know about Haskell, but Go is for writing microservice based web servers. Pretty sure Haskell is another domain in general.

>I was only pretending

Yeah I wasn't talking about changing how scope works. When I said "execution semantics" I meant "execution semantics" like, for example, order of evaluation and interaction between threads. There are lots of examples of exactly this. And besides, even if I wanted a new scheme for binding vars, I could implement a much better solution in Haskell that preserves type safety. I think you've never actually tried to write something more complicated than "hello world."

70 IQ, not able to grasp a 2-line example

And what have you written in Haskell? Come on, let us know. I love Haskell, but I'm not deluded enough to not understand that it's not the most suitable option for when you really want mutable variables and data structures. Haskell is not some kind of lisp with superb metaprogramming capabilities, you're not meant to use it to "create new languages". You write Haskell in Haskell.

haskell
go is usable and shitload of good projects are made in go especially in networking and sysadmin tools

>go is usable
so is Haskell as long as you don't sniff petrol all day like an abbo
>shitload of good projects
like?
if you go to the broad picture Haskell library is quite extensive and generally well written.

>And what have you written in Haskell?
A few compilers and interpreters, an image editor, and some shitty games. I jumped ship a long time ago and lost 99% of my code a few hard drives back, so I don't have examples.
>you're not meant to use it to "create new languages". You write Haskell in Haskell.
The intent of the creators of Haskell was as I described: A toolkit for experimenting with novel language features. I'm not pulling this out of my ass. It's what they originally wanted, and it's how they used it. Most of the contributions to society by Haskell programmers have probably been in the form of new language features rather than actual production code.
However, you seem to have some ideology going on, and what you're prepared to believe is rooted in that ideology and there's no way anyone can convince you of anything. So here's where I get off. Bye.

docker.com/
kubernetes.io
syncthing.net/
github.com/influxdata/influxdb
the projects I use.
I like playing with tcp/udp api, it's easy to try things.

>However, you seem to have some ideology going on
Nice try high-horsing. Fact of the matter is that the Haskell compiler can't statically determine whether a variable in your state monad is initialized. You'd probably need some form of dependent types for that to be possible.

If you were declaring x in the same scope you are using it you wouldn't be using a state monad in the first place

I was looking for something like a generalization of block-based scoping using monads. Say, you define a function and its local variables, define its instructions using do notation, and then want to use variable "x". Does x come from local scope or somewhere outside of the function? Has it been initialized? Haskell's type system currently doesn't seem to be powerful enough to answer those questions statically.

>implying Ken tomphson is not competent
Zoomer detected

Haskell without a doubt. It’s been in development for over 20 years and it’s package managers still suck ass.

OK, two things.
1. Monads are a type-level construct, not some data structure that exists at runtime. In fact this might be the #1 misconception people have about monads.
2. You don't need dependent types. Just session types. And monads are the perfect abstraction for working with those.

Let's assume you know all your variable names at compile time. Define each one as a separate type (they can be empty types, whatever) and encode your program state as a type-level list where each element can be one of several wrappers around a "variable name" type: Uninitialized, Immutable, Mutable, whatever. Then define your writeVar and readVar functions as methods on two different typeclasses. Implement the first for all state variants in which the variable in question has been declared, but implement the second only for state variants where it's also been initialized. Now you can write functions that swap the values of X and Y, but can only be called from states where they've been initialized.

This probably sounds like a lot but it's an existing technique for encoding the states of CPUs so you can statically analyze assembly. There are multiple libraries that do this.

>more as a toolkit for implementing your own language features.
You're only talking about Haskell's strengths, not its weaknesses. Cabal and Stack are shit, and the idiomatic lazy evaluation was such a catstrophically retarded choice that entire derivative projects exist to get away from it.
Even if you aren't personally bothered by this, they do give non-FP developers an unfair impression of what FP is like in general.
>Of course, if you do end up needing an entire compiler, that's when you want OCaml hackers.
I wanted OCaml hackers to begin with. Jane Street was always right.

go is the programming equivalent of a containment board
it is not a meme
no one who can program should use it
but they should be fucking glad it exists

haskell is a meme for nerds

>no one who can program should use it
what should they use instead?

>no one who can program should use it
It is idiot-friendly, but unfortunately, there are no other languages that fill its niche for competent users. Everything else is just reinventing C++ but even more convoluted.

whatever language best fits the task at hand
ideally you should be comfortable with at least one scripting language, one interpreted language, and one native language

it was made because rob pike thought google's engineers were too dumnb; that's its niche and primary purpose.
genuinely asking, what secondary use does it have

>it was made because rob pike thought google's engineers were too dumnb; that's its niche and primary purpose.
It was also developed by Ken Thompson, which kept the project in check. The current devs openly admit that they oversimplified the language and plan on extending it later.
>genuinely asking, what secondary use does it have
Being C-like with modern conveniences and the syntax's rough edges smoothed out.

>>Being C-like with modern conveniences and the syntax's rough edges smoothed out.
that's not a niche, at least not pragmatically
that's a niche in the sense of it satisfying certain tastes
is something that gives an objective benefit to using go regardless of ones own personal tastes in stylistic choices?
i have heard that apparently it's easy to write multithreaded applications in or something like that

>it was made because rob pike thought google's engineers were too dumnb; that's its niche and primary purpose.
stuff like this makes me want to drop the fucking internet
you never followed Go's development process
you heard a out of context Pike's quote (or probably you are too dumb to fucking interpret it) and straw man it to oblivion
shut the fuck up, fucking retard

At least Go is actually being used.
I haven't even heard of a haskell programmer. I'm sure they exist, but nobody even knows what the fuck haskell is.

Java.

Now this was a much more constructive post than the ones earlier.

Yes, session types seems like a fitting concept. That's not part of vanilla Haskell, though.

Anyway, what you're describing does indeed sound like it could work. But putting every possible value you work with really seems like a strenuous and kind of ugly solution. If your function has two variables x and y, and each of them may or may not be initialized at one point, do you have 4 different types of state your function needs to handle? And how do you express those types as one state monad?

Again, I really like Haskell and I've written a simple compiler in it too, but even with how powerful it is I still consider imperative languages to be more suited for describing commonplace state mutation. They're kind of like DSLs for things you could also express with Haskell, but more verbosely. Of course if there's some kind of a Haskell library that fully emulates function scoping of imperative languages then I'd happily be proven wrong.

what possible context could change the meaning of that their employees struggle with programming, even with python, to anything less than google engineers are retarded

defining every possible value as a new type*

>i have heard that apparently it's easy to write multithreaded applications in or something like that
Yes, imo this is the only part of Go that's even mildly redeeming: coroutines.

/thread

Why is Stack shit?

>ideally you should be comfortable with at least one scripting language, one interpreted language, and one native language
I think the bigger question here is if you can define all three of these independently of each other.

Syncthing is awesome, but Go is poor man's D.

>genuinely asking, what secondary use does it have
A language for writing concurrent and parallel network daemons, like a poor man's Erlang. A statically typed scripting language with batteries included, like a Python that compiles down to a single binary.

>is something that gives an objective benefit to using go regardless of ones own personal tastes in stylistic choices?
Yes, it's as easy to develop in as a scripting language without being slow as shit, and like you mentioned it makes concurrency a lot more practical.
It's not great, but enough non-webshits use it that avoiding the webshits is trivial.

>scripting language
something that is primarily either jit compiled or interpreted at raw text on the fly
e.g. python, lua
>interpreted language
something that is primarily compiled to a language specific hardware independent bytecode
e.g. java, c#
>native language
something that is primarily compiled to hardware specific bytecode
e.g. c, c++, go

keyword here being primarily, alternative means of compilation will always exist

>hardware specific bytecode
lol

so different that they're hard to compare. Differences in syntax are pretty self-evident.
Go is good for web backend and small applications. Haskell is great for some domains of scientific computing, finance apparently (see: Barclay's), and from my experience, it's fantastic at pretty much anything where the main purpose centers around text processing.
Haskell is one of those languages where you either love it or you hate it. A lot of the things in Haskell that make one person love it are the same things that make other people hate it- lazy evaluation, monads, its order of evaluation, etc. There just isn't much to say about Haskell that hasn't been said a million times.
Goroutines are nice, but unimpressive when compared to the competition. Kotlin's coroutines are much more powerful. Erlang and its derivatives are still miles ahead of the pack. Even the smaller upstart languages like Nim have much more powerful, yet equally ergonomic concurrency models, and with Nim you don't sacrifice a performant FFI the way you do with Go.
I really dislike Go's type system, it's inexpressive and unhelpful. With C, there are at least valid reasons to have an extremely gutted type system- it was designed to be very permissive of low-level bit twiddling. Go doesn't have that excuse. Go's type system just seems like it was implemented by some curmudgeonly guy who's still basking in the glory of an OS he co-developed in the 80s (go figure).

>Barclay's
Barclays, fuck. I should stop phone posting.

>Go's type system just seems like it was implemented by some curmudgeonly guy who's still basking in the glory of an OS he co-developed in the 80s (go figure).
Heh.

This is the best post I've seen on this board in a long time

>Go's type system just seems like it was implemented by some curmudgeonly guy who's still basking in the glory of an OS he co-developed in the 80s (go figure).
kek'd but the main reason Go's type system is so basic is because the language was designed to compile and run quickly.

Ken is the reason the language resembles C superficially, and he wrote the first compiler, and that's about it.

thanks desu

>gutted type system and metaprogramming = better performance
tell that to all the people desperately looking for a reason to shill C++. Go's compile times aren't good enough that I'm willing to sacrifice solid static analysis, and its performance is average at best.

I don't know if it's as fast to compile as Go, but OCaml compiles very quickly, and its type system is not far behind the state of the art.

>its type system is not far behind the state of the art
Yeah, I guess being 20 years behind instead of Haskell's 15 isn't that bad.

>Go, but at least its a useable language
I gather you have never had it parse moderately complex json.
And what kind of language uses "append" to delete elements from a collection?
Go is an abomination

>Cabal and Stack are shit
False

>the idiomatic lazy evaluation was such a catstrophically retarded choice that entire derivative projects exist to get away from it.
There is nothing catastrophic about lazy evaluation. The only disadvantage is that sometimes you have to force eager evaluation. The concurrency model and the parallel strategies are amazing and they wouldn't be possible without lazy evaluation.

>general purpose languages created for different purposes
literally retarded

You can use Haskell for web development with Yesod

Emoji programmers on suicide watch

Haskell isn't even used, the only reason you know it exists is when someone asks what a monad is.

Go is a primitive language, but it's obviously productive given how fast it has seen adoption.

>Haskell isn't even used
anti-spam filter of facebook was made with haskell
that's a big fucking deal

ST

>haskell isn't used
>Barclays' entire codebase is haskell
literally the most powerful investment banking firm in the world is powered by Haskell. Goolag and Apple are irrelevant.

my $1 sticker pack is arriving today and my gf already wants to put the golang sticker on her laptop because "it looks cute"

pics?
of gf I mean