Go is not an easy language

Go is not an easy programming language. It is simple in many ways: the syntax is simple, most of the semantics are simple. But a language is more than just syntax; it’s about doing useful stuff. And doing useful stuff is not always easy in Go.

Turns out that combining all those simple features in a way to do something useful can be tricky. How do you remove an item from an array in Ruby? list.delete_at(i). And remove entries by value? list.delete(value). Pretty easy, yeah?

In Go it’s … less easy; to remove the index i you need to do…

https://www.arp242.net/go-easy.html

This thread was posted by one of our members via one of our news source trackers.

3 Likes