3 ms·
Any idea why they have such a low byte budget? testing.Fuzz would be so much more readable. I'll accept test.Fuzz if 9 characters is the limit for any compound
by meetups323 5y ago
Any idea why they have such a low byte budget? testing.Fuzz would be so much more readable. I'll accept test.Fuzz if 9 characters is the limit for any compound identifier. Is this sort of single letter class naming common in the standard library?
- unfunco 5y agoNot in the standard library in general, but in the testing package it's the convention. There's testing.B, testing.M, testing.T, and testing.F, and *testing.TB. https://pkg.go.dev/testing#pkg-types https://pkg.go.dev/testing#pkg-types
- meetups323 5y agoWell that's a hard pass from me. I always knew go was quick to compile, I didn't know the lengths they were willing to go to achieve that! Case in point: it's not TB, as you stated, but rather PB.
- joshuamorton 5y agoThere's both, TestBase and ParallelBenchmark.
- IshKebab 5y agoHe's still right about that. Ridiculous naming. Fortunately the rest of Go uses sensible names so I think it would be silly to avoid Go just because of that.
- gvil 5y agoit's super common everywhere, also in third party libraries (`bson.M` is what exactly?). it's one of the reasons that makes go a very displeasing language to work with.
- azth 5y agojust golang things, I agree it doesn't make sense (as do many other things in the language)