this post was submitted on 03 Aug 2023
27 points (100.0% liked)
Golang
2391 readers
3 users here now
This is a community dedicated to the go programming language.
Useful Links:
Rules:
- Posts must be relevant to Go
- No NSFW content
- No hate speech, bigotry, etc
- Try to keep discussions on topic
- No spam of tools/companies/advertisements
- It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Calling one function and getting either an empty container or a container full of empty elements is very strange behavior.
Are you speaking about
clear
? It’s my understanding thatclear
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? 🤔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.