5 ms·
I'm curious. Why the short names such as .len instead of .length? Also, ui.WindowCfg instead of ui.WindowConfig? I think this would make we hesitate all the tim
by wronex 8y ago
I'm curious. Why the short names such as .len instead of .length? Also, ui.WindowCfg instead of ui.WindowConfig? I think this would make we hesitate all the time. Was it .new_textbox or .new_txtbox? Short keywords are one thing (Lua's local and function are no fun) but abbreviated library functions and types are another.
- snowAbstraction 8y agoFor me I guess, it depends how many such abbreviations one must learn. 100 fine. 1000 too many for me.
- lapnitnelav 8y agoAgreed, predictability is huge. I think our systems can handle an extra few characters :)
- deleted 8y ago[deleted]
- jxy 8y agoWhy is this such a big deal? Is there really so much difference among ui.WindowCfg, ui.WindowConfig, and ui.WindowConfiguration? As long as everything is consistently named within a framework/language, I don't see any problem.
- krainboltgreene 8y agoYes. The latter are words, cfg is not a word. Words are easy to google, say, pronounce. "shortenings" are up to interpretation, have no translation.
- jxy 8y agohttps://www.merriam-webster.com/dictionary/config https://www.merriam-webster.com/dictionary/config > “config” > The word you've entered isn't in the dictionary. Click on a spelling suggestion below or try again using the search bar above.
- krainboltgreene 8y agoHey, I prefer configuration, so you'll get no argument from me on that, but it's definitely more of a word than cfg.
- deleted 8y ago[deleted]
- BonesJustice 8y agoI tend to agree. That said, I rather like V’s short primitive type names (i32, u32, f32, f64, etc.). But why do definitions put the type _after_ the field/variable name? So many of your type names are the same length! Think of the beautiful column alignment you could have if you put the type _first_!
- onlyrealcuzzo 8y agoI'm guessing here, but I don't think column alignment was a consideration for the ordering.
- BonesJustice 8y agoI would be concerned if it had been :).
- amedvednikov 8y agoV aligns your code automatically :) Also variables are declared with `a := value` On putting the type after the name: https://golang.org/doc/faq#declarations_backwards https://golang.org/doc/faq#declarations_backwards