this post was submitted on 03 Aug 2023
27 points (100.0% liked)

Golang

2391 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 2 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] mordred@lemmy.world 2 points 2 years ago

Much needed improvements to make code cleaner and smoother, especially with packages maps and slices

[–] BitSound@lemmy.world 2 points 2 years ago (2 children)

Calling one function and getting either an empty container or a container full of empty elements is very strange behavior.

[–] CodeBlooded@programming.dev 1 points 2 years ago* (last edited 2 years ago)

Are you speaking about clear? It’s my understanding that clear doesn’t get you anything. It modifies the object passed to it, sure, but it doesn’t return different types back to the caller.

Edit: I notice this is downvoted- can someone provide feedback if my understanding of clear is incorrect? 🤔

[–] hairyballs@programming.dev -1 points 2 years ago

I honestly try and read Go news from time to time, with an open mind, but the amount of terrible footguns is astounding, especially when the language is marketed as "simple" and easy for beginner to grasp. I would pick C# or Java over it anytime.