zlacker

[return to "WebKit Quirks.cpp"]
1. l_f+ud[view] [source] 2022-10-14 20:36:14
>>Bodaci+(OP)
I love how they name things

shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost(...)

◧◩
2. kitsun+ag[view] [source] 2022-10-14 20:54:01
>>l_f+ud
Can't leave any room for ambiguity!

Apple-style function/method naming may be verbose but at least the names usually have good explanatory value and aren't just meaningless verbosity.

◧◩◪
3. shadow+5l[view] [source] 2022-10-14 21:26:56
>>kitsun+ag
And in the 21st century, everybody's using tab to autocomplete that string anyway.
◧◩◪◨
4. userbi+un[view] [source] 2022-10-14 21:41:06
>>shadow+5l
The problem is when you have multiple very long identifiers that differ only in a few characters. When scanning through code, it's much easier to see the difference between a saaainheafh and a saaainheafi than it is a shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost and a shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForInput.

Also, autocomplete doesn't work when you're reading and not writing, or just using a text editor or reading/annotating a printout (yes, I still do that.) IMHO writing code that almost completely relies on special tools to handle it is a bad trend.

◧◩◪◨⬒
5. shadow+9r[view] [source] 2022-10-14 22:05:52
>>userbi+un
I'm surprised that I strongly disagree. My eyes glaze right past the difference between the fh and the fi in that example.

They also glaze past the end of the mega-strings, but I usually solve that problem by either actually ctrl-F finding for the string (which will highlight it) or by finding an examplar and selecting it (which will highlight all instances of the same symbol in the languages and IDEs I use).

I'm a firm believer that "code isn't just text" (in fact, most of my frustration with code is tools that treat it so... The set of strings that aren't valid programs is vastly larger than the set that are, so why should I be treating programs as if they're mere strings? It'll lead me to create non-compilable artifacts). So I try to avoid being in situations where the only tools I have to work with to understand code are a text editor or an annotated printout (I don't doubt that's done in places, but I've gone my whole career managing to avoid it so far).

◧◩◪◨⬒⬓
6. kitsun+AK[view] [source] 2022-10-15 01:05:05
>>shadow+9r
> My eyes glaze right past the difference between the fh and the fi in that example.

Same here. The difference isn't significant enough for my eyes to latch onto.

If I had to come up with short readable function names, I would still use whole words, but would 1) cut the number of words down to the bare minimum 2) make each name as unique as practically possible.

[go to top]