Live data from Hacker News

Three Months of Go from a Haskeller’s perspective (2016)

memo.barrucadu.co.uk

11–20 of 162 posts

Re: Three Months of Go from a Haskeller’s perspective (2016)

#12
post #2

(2016) The versioning and slice sorting have since been solved, by go.mod and sort.Slice respectively. The problem with "Make it an error to not initialise a struct field" is you lose source compatibility when adding new struct fields.

Still no official debugger though. Delve is just full of bugs.

delve (through vscode-go) has worked fine from my perspective

Re: Three Months of Go from a Haskeller’s perspective (2016)

#14

I actually wish gofmt was _more_ opinionated. Break my lines please. Prettier has spoiled me - write absolutely hideous looking code, and one save later it is exactly what I want almost every time.

I was very apprehensive about prettier at first, but I pulled it into a side project of mine and I am never looking back. I absolutely loathe people’s obsession over formatting code. Just let a formatter do it, don’t fuck with the defaults, and work on your business logic instead of bike shedding on perfectly placed spaces.

Totally agree, but you need an iron-fisted formatter to make that work. Because otherwise you get an ever-changing quilt of every dev's style du jour, and while I don't think the specific formatting you use matters, I think sloppiness and inconsistency are actually harmful.

Re: Three Months of Go from a Haskeller’s perspective (2016)

#15
post #10

Apparently, the author of this blog post had a change of heart: https://memo.barrucadu.co.uk/blub-crisis.html > I have realised in recent conversations about programming languages, and in reflection of my very negative and kind of arrogant blog post about Go, that I have become trapped by the Blub Paradox. I have become dismissive of non-Haskell languages. I think in Haskell. Languages less powerful than Haskell are…

I thought the criticisms and praise, and the article's Good/Neutral/Bad structure, were fair and thoughtful on balance. It didn't read as arrogant to me.

Re: Three Months of Go from a Haskeller’s perspective (2016)

#16
post #10

Apparently, the author of this blog post had a change of heart: https://memo.barrucadu.co.uk/blub-crisis.html > I have realised in recent conversations about programming languages, and in reflection of my very negative and kind of arrogant blog post about Go, that I have become trapped by the Blub Paradox. I have become dismissive of non-Haskell languages. I think in Haskell. Languages less powerful than Haskell are…

My Blub language has been PHP. While the language has been getting better over the years, especially with the introduction of types, I still felt at one point that I wasn't growing. I had a try at Haskell, and failed miserably. I tried OCaml, but still something felt unnatural to me, although what really intrigued me was the sound type system and the guarantee that if it compiles, then it's probably going to run well. I then tried Elixir, and I love it. I think Elixir is a wonderful transition language, but something that I wouldn't mind keeping close in my toolstack. The Actor model, immutability, pattern matching, meta programming, these are all concepts that uppended my way of thinking. PHP/JavaScript array sort functions feel so weird to me now for doing the sorting directly on the variable. But to be honest, I wish Elixir had types. I don't trust myself writing functions that can return different things.

Re: Three Months of Go from a Haskeller’s perspective (2016)

#17
post #9

I actually wish gofmt was _more_ opinionated. Break my lines please. Prettier has spoiled me - write absolutely hideous looking code, and one save later it is exactly what I want almost every time.

https://github.com/mvdan/gofumpt Drop in replacement for `go fmt` and probably does most of what you want.

> Running gofmt after gofumpt should be a no-op.

This looks perfect actually.

Re: Three Months of Go from a Haskeller’s perspective (2016)

#18
Go is a programming language for teams, not primarily designed to impress individual programmers...

I agree with all points with the author. But working in teams, or even mutiple teams on the same software, then go solves a lot of problems for you..

Yeah its a dumb language, missing a lot of features. But there is only 1 way to program, dependency management is sane (no circular dependencies), and the language is build for readability, not for writing code fast and elegantly...

Often short dense code with complex types is just really hard to read for your overage joe programmer.

We're not all computer scientists here.

Go is designed to write maintainable server side programs that can utilize concurrency in computer these days. Therefore they left out generics... I hope its coming. I do wish error handling and generics where part of the language... And a tuple type indeed.

Re: Three Months of Go from a Haskeller’s perspective (2016)

#19
post #10

Apparently, the author of this blog post had a change of heart: https://memo.barrucadu.co.uk/blub-crisis.html > I have realised in recent conversations about programming languages, and in reflection of my very negative and kind of arrogant blog post about Go, that I have become trapped by the Blub Paradox. I have become dismissive of non-Haskell languages. I think in Haskell. Languages less powerful than Haskell are…

Definitely! I couldn't get my head around why people like untyped languages, but I keep an open mind on it. I won't close off that they could be better, if the right patterns/practices are used (whatever they are!)

Re: Three Months of Go from a Haskeller’s perspective (2016)

#20
Go is like SQL, where it's pragmatic for TEAM work, where your teammate has little background on programming, because Go code is easy to follow, extend (copy and paste and modify).

In my case, my team is composed of most of DBA experts, they have no problem following Golang code.

So your programming languages of choice should base on your team.

Post reply on HN