5 ms·
Go had, last I manually counted, a whopping seventeen numeric types. That's a lot of complexity just in interpreting numeric literals!
by myWindoonn 8y ago
Go had, last I manually counted, a whopping seventeen numeric types. That's a lot of complexity just in interpreting numeric literals!
- abiox 8y agoafaik the bulk of those are just related to sizing (16 bits, 32 bits, etc). it's not really that complex, and generally quite handy for a language like go.
- pythonistic 8y agoThe underlying types are exposed to you, like C. Go isn't adding sugar to handling numeric types: it's not autoboxing to help you with conversions, and it's not hiding the implementation like a scripting language. I'll admit, it's a real pain when trying to convert from one type to another (e.g., in graphics programming, where I'm changing types from internal representations to what gets drawn to the screen). For most "job" programming, it was a non-issue and I felt secure in knowing what types, sizes, and representations I'm really using.
- icholy 8y agoGive me a break
- tapirl 8y agoI ever had many confusions in studying Go, but I never had any confusions on numeric literals. Go nmeric literals are intuitive and consistent with many other popular languages.