961
rule (lemmy.dbzer0.com)
submitted 1 year ago by Sivecano@lemmy.dbzer0.com to c/196
you are viewing a single comment's thread
view the rest of the comments
[-] evranch@lemmy.ca 2 points 1 year ago

I wouldn't call this a "python thing".

I grew up with C and C/++ is still my main language, checking for empty strings is instinctive to me. It's cheap insurance and what does it cost, a couple cycles?

Though you won't find me using bare cstrings these days unless there is a damn good reason for it. So much extra work to handle them. Even in embedded work, String classes have superceded them.

this post was submitted on 07 Dec 2023
961 points (100.0% liked)

196

16721 readers
2325 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 2 years ago
MODERATORS