[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
These function names suck, therefore C sucks.
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 39
Thread images: 3
File: String-Function.jpg (40 KB, 500x349) Image search: [Google]
String-Function.jpg
40 KB, 500x349
These function names suck, therefore C sucks.
>>
string and then a shorthand of the function, how much easier could it get?
>>
>>51828841
He's probably an object orientated programmer.
>>
>>51828841
Did you mean to type "wrote str then had a stroke at the keyboard"?
>>
>>51828880
practically everything in unix is heavily shorthanded, and C is no exception being heavily influenced by unix.

compare the windows or java API, where everything is UnnecessarilyUpperCaseFunctionNames, you can appreciate being able to shorthand something when used often
>>
>>51828790
>>51828880
suggest 'better' names for five of these functions.
>>
>>51828918
The IDE will autocomplete
>>
File: 1433723510009.jpg (49 KB, 836x874) Image search: [Google]
1433723510009.jpg
49 KB, 836x874
>>51828790
>there are people who don't think these names are good
>those same people probably believe something like CopyCStringToDestinationFromSource would be better
>>
>>51828918
yeah although unix was before IDEs whereas AllTheUpperCaseShit is IDE hand holding
>>
The biggest problem with C's standard library is that there is no database or GUI library built-in
>>
>>51828949
still doesn't help. I'm at the point where practically every line of code, every letter in that line, is my enemy

reduce it as much as possible
>>
>>51829044
that's nice dear
>>
>>51828790
>judging a language based only on the naming conventions of a set of library functions.

Is this your first month programming in C? If so I hope you can eventually see the beauty in the control it provisions you with.
>>
>>51829069
That control is unnecessary for 99% of applications
>>
you forgot strstr op
>>
>>51829085
Perhaps if you are resigned to programming for the open web it may feel like 99%. The increasing push for the IOT has dramatically increased the demand for networking capability on small embedded devices. They require the speed and weight of C.
>>
>>51828790
>copyStringIntoString()
>appendStringToString()
>compareWith()
>compareWithCaseInsensitive()
>countLengthOfString()
>reverseString()
>convertToLowercase()
>convertToUppercase()
>findFirstOccurrenceOf()
>findLastOccurrenceOf()
>setAllCharactersTo()
>setSpecifiedCharactersTo()
like these more, faggOP?
>>
File: 1432913162922.jpg (68 KB, 506x337) Image search: [Google]
1432913162922.jpg
68 KB, 506x337
>>51828790
Complete C++ noob, can I rename default function calls in the header?
>>
>>51829292
If functions are first-class objects sure.
>>
this isnt an OOP language you flaming faggot
>>
It's because linkers limited external names to the first 6 characters.
>>
>they all assume null terminated strings
>they all assume ascii

DROPPED
>>
>>51828918
>>51829044
>>51828976
> I type at 35wpm because of my carpel tunnel from years of using emacs.
>>
>>51828790
Suggest better names then faggot
>>
>>51829424
>null terminated strings aka C-strings
>what are wcs* functions
>>
>caring about the stdlib
>thinking string handling is a deal breaker

>>51829427
Vim hurts more than emacs if your ctrl key is in the right spot instead of where fn belongs
>>
>>51829393
>strcmpi
>strrchr
>strnset
>>
>>51829934
strcmpi and strn* are decades newer. strrchr is unique in the first 6 characters.
>>
>>51829069
>the control
fun way to spell lack of features
>>
>>51828949
>>51829427
The code is still less readable. Short <= 8 sign function and variable names names any the code so much better to read.
>>
>>51829559
your ctrl key is not on the corner of the keyboard? poor you
>>
>>51828790
most of those aren't even standard C.
>>
>>51828973
>not using AbstractEnterpriseCopyCStringFromSourceToDestinationBeansFactoryFactoryInterface
>>
>>51829424
>they all assume ascii
No, it assumes char a.k.a. bytes. C strings don't assume encodings.
>>
>>51828790
C is inferior to C++ in strings.
>>
>>51829424
Nothing wrong with that.
>>
>>51828790
Wow, python babby can't into C. Fuck you, you fuck.
>>
>>51834199
Exactly, it's the programmer's responsibility. Good way to weed out the curryshit code monkies.
>>
>>51828790
>string copy
>string concatenate
>string compare
>string compare insensitive
>string length
>string reverse
>string lower (case)
>string upper (case)
>string character
>string reverse character
>string set
>string number set

Seems logical to me.
Thread replies: 39
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.