3 ms·
I think only #1 really counts as a gotchya. #3 is literally just "spend at least 2 seconds knowing what a slice is" Most programming language gotchas are liter
by stcredzero 9y ago
I think only #1 really counts as a gotchya. #3 is literally just "spend at least 2 seconds knowing what a slice is"
Most programming language gotchas are literally, "just spend {small time increment} learning about {thing}." Those things build up and get lost/misplaced. Programming "nickels and dimes you to death." Design is about the emergent interaction of myriad details. Programming language design is exactly that as well.
- dilap 9y agoi'd say a "gotchya" is something in a language where there's a subtlety that confounds what you would reasonably expect to happen, after obtaining a casual famiarity with the language. the slice examples doesn't qualify because it's integral to the fundamental idea of what a slice is. they only way this could confound your expectation is if you'd literally spent zero time learning what a go slice is. (so i guess it is a gotchya if you see "slice", know python slices, and assume the concepts are the same and don't bother to investigate any further.) by the way, i agree with you that "Design is about the emergent interaction of myriad details"; by that criteria go is very well-designed...