4 ms·
I'm not so sure that is good advice, and I come from C programming so we love to do that. With autocompletion in most code editors saving the user typing time
by kabouseng 11y ago
I'm not so sure that is good advice, and I come from C programming so we love to do that.
With autocompletion in most code editors saving the user typing time is not a valid argument anymore, and I would rather prefer comprehensible if slightly more verbose code than accronyms everywhere.
What is obviously ctx -> getCurrentRuntimeContext for you is completely foreign to the next guy. And sometimes you don't spend a large amount of time in a specific part of a code base, such as when debugging and then figuring out what ctx means is a real PITA.
- rumcajz 11y agoImagine Ritchie & Thompson would have taken the above advice and named ++ operator "increment(x)". That would suck in a big way.
- jacquesm 11y agoI know you jest but I can actually see some advantages to not even having a ++ (and a --) operator. You already have '+1' and '-1' so it's not even shorter (and those can't be sneakily inserted into expressions leading to side effects of the expression other than the value computed) and the post and pre-decrement versions of that can lead to very subtle bugs.
- icebraining 11y agoIt's shorter because with +1 you need to write the variable twice. That said, I do prefer Python's += operator over ++.
- deleted 11y ago[deleted]
- hollerith 11y agoSomeone reading your comment might be left with the false impression that C does not have the += operator.
- icebraining 11y agoFair enough, I meant Python uses += in lieu of ++, since it doesn't have the latter.
- walshemj 11y agoYou are assuming that every one can recall 25+ letter names - dyslectics have problems with this sort of short term memory.
- Retra 11y agoThat is a very weak argument. Is there anything that suggests letter count is a barrier to dyslexics, and not, say, word count or number of obscure abbreviations?
- walshemj 11y agoYes short term memory tests are one of the primary diagnostic tests for dyslexia. Ie how many consecutive numbers/letters you can recall. Long Names like SomeRealyLongNameFunctionThing and SomeRealySimialrLongFunctionNameThing are both hard to work with and confusing to me.