3 ms·
> Oh, and I think he missed the most surprising thing about Go for newcomers: that "if" creates scope! Go is block scoped, and if statements are blocks. I don'
by ominous_prime 14y ago
> Oh, and I think he missed the most surprising thing about Go for newcomers: that "if" creates scope!
Go is block scoped, and if statements are blocks. I don't see this as surprising.
I agree some set operations would be nice, maybe using an interface like Sort, but you can use a map as a basic generic set data structure. This is how many language implement a set anyway.
- mratzloff 14y agoGo is block scoped, and if statements are blocks. I don't see this as surprising. I meant surprising for someone used to Python, like the article author. I'm surprised he didn't mention it.