re: The first few times I looked at Go, I felt almost exactly the same way. Then I changed job and there was quite a lot of existing Go code, with more...
 

It just also happens to be a reasonably good hammer for the particular nails [...]

Well, it’s Turing-complete (thank God :)

I can actually write the code in almost any language without whining and blaming the language—and I do sometimes. The main point is there are many blatant design mistakes that could have been avoided even in the frames of the chosen paradigm.

unsafeCoerce

I disagree. unsafeCoerce explicitly tells “I know this type should be used here instead of that type.” That is not the same as “ok guys, here we accept whatever crap.”
Also, the help on it starts with wording “highly unsafe.”

 

I can actually write the code in almost any language without whining and blaming the language—and I do sometimes.

A sign of maturity. Or resignation. ;-)

there are many blatant design mistakes that could have been avoided even in the frames of the chosen paradigm.

Maybe from their perspective it's a feature and not a bug? I believe — and of course I have no proof for that — that Go was mostly designed around ease of language/runtime implementation.

unsafeCoerce explicitly tells “I know this type should be used here instead of that type.” That is not the same as “ok guys, here we accept whatever crap.”

Fair point. If we ever have the need for an interface {} in our code base I'll make sure to give it the appropriate alias: play.golang.org/p/016kenwRi6K

code of conduct - report abuse