I don’t know if this was updated after your post, but he does introduce the stringer tool. Which I realize is a little ridiculous as a language tool, but thought I’d point it out.
In the post, first I’m trying to explain how enums work rather than the best practices. Then, I widening it more about what to use for enums. Including stringer and iota.
It would just be a screenshot of your article with me, offscreen, futilely typing Alt-Left.
And is sounds like qbit may have had a different problem where the js used history.pushState() incorrectly and there were too many items to go back through. Again, won’t be visible in a screenshot.
We’re not seeing any problems with this on our side. I think in this case it would be best if you could ask the user who is experiencing problems to write in to yourfriends@medium.com where we can troubleshoot this directly with them.
The issue I had was basically exactly what pushcx explained. Every heading I scrolled past added an entry via history.pushState(), so every press of the back button just went up to the previous heading.
Wow, good comment! I hadn’t looked at it from this perpective. My native-language isn’t English btw, however, I used to English, so it comes natural to me in Go.
Why would you tag the explanation of a trivial language feature with “AI”? Is “AI” the new “VR” in the buzzword hierarchy?
I put that tag incorrectly, may bad, sorries.
I feel like this would benefit from an ontology that indicates how these are related to each other.
Hmm, can you give an example?
An example of an ontology?
🤓 Got it.
The problem with the example implementation of String() is that it needs to be kept in sync with the set of values in the enum type.
I don’t know if this was updated after your post, but he does introduce the stringer tool. Which I realize is a little ridiculous as a language tool, but thought I’d point it out.
No, Stringer recommendation was there.
In the post, first I’m trying to explain how enums work rather than the best practices. Then, I widening it more about what to use for enums. Including stringer and iota.
I’ll be writing new articles to my Go programming blog.
I enjoyed your post but the auto-adding of browser history items makes me rage inside! I had to rage quit to get back to lobsters!
Thx! I don’t understand what you mean, sorry :-( What should I do better?
There’s some javascript on the page that breaks the back button.
Hmm, that must have been because of Medium.com. Can you send me a screenshot so I can tell them about the problem?
It would just be a screenshot of your article with me, offscreen, futilely typing
Alt-Left
.And is sounds like qbit may have had a different problem where the js used
history.pushState()
incorrectly and there were too many items to go back through. Again, won’t be visible in a screenshot.Hmm, ok, I’m telling them about this problem. I hope they’d fix it.
They said:
Oops :(
The issue I had was basically exactly what pushcx explained. Every heading I scrolled past added an entry via
history.pushState()
, so every press of the back button just went up to the previous heading.If you can’t email them, I can try again. Which browser and device you were using when you had the issue? Thx for your help btw!
While I like the “humanized” approach, it does seem rather specific to language that have the same sentence structure as English.
Wow, good comment! I hadn’t looked at it from this perpective. My native-language isn’t English btw, however, I used to English, so it comes natural to me in Go.
Looks like a good primer to Go - thanks!
I’ve heard this as a criticism before, but as a person who did quite a bit of Ruby, I think this isn’t a downside but is instead an upside ;)
Consider some of the most frequently downloaded Ruby gems. Lots of these are right in the Go stdlib:
json
,multi_json
->encoding/json
mime-types
->mime
tzinfo
->time
Is this just a case that Go has more batteries included than Ruby or Node.js?
Yeah, exactly! I know what you mean, I came from both Nodejs and Ruby communities to Go. And, millions of fragmented packages bit me too…
I put it there in disadvantages however I don’t think most of them as disadvantages, only that, people can may judge it that way, I’m not sure.