DEV Community

Discussion on: Abbreviations in code: yay or nay?

Collapse
 
vergeev profile image
Pavel Vergeev

I vote abbreviate, but only a limited number of words, such as HTTP, JWT, SMTP.

Everyone has auto-completion these days, why bother with short names.

Collapse
 
peledzohar profile image
Zohar Peled

Your examples are acronyms, not abbreviations. Of course no one is expecting to see a variable name like hyperTextTransferProtocol, but would you use dept. instead of department?

Collapse
 
vergeev profile image
Pavel Vergeev

Oh, I didn't know the distinction. Thank you!

Then no, I would not like to see abbreviation in my code. This is for the sake of consistency and readability.

Thread Thread
 
peledzohar profile image
Zohar Peled • Edited

Well, as it turns out, acronyms are a specific type of abbreviations, so we where both correct. You might say that acronym is derived from abbreviation.
:-)