Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C is bloated and dangerous

Name: Anonymous 2016-01-19 20:38

getchar/getc/fgetc
putchar/putc/fputc
puts/fputs
setbuf
tmpnam
printf/fprintf/sprintf/snprintf/vprintf/vfprintf/vsprintf/vsnprintf
any function about wchar_t
strtok
scanf/fscanf/sscanf/snscanf/vscanf/vfscanf/vsscanf/vsnscanf
atof/atoi/atol/atoll
perror

Were they on drugs?

Name: Anonymous 2016-01-19 22:17

I know

Name: Anonymous 2016-01-19 22:22

C will do worse to your mind than any drug.

Name: Anonymous 2016-01-19 22:43

>>3
that's BASIC bro

Name: Anonymous 2016-01-20 0:15

>>1
The 60s had just ended. Yes.

Name: Anonymous 2016-01-21 2:08

You can make it safe by using Microsoft's _s functions.

Name: Anonymous 2016-01-21 4:54

>>6
More like make it less safe. Those _s functions are a gimmick.

Name: Anonymous 2016-01-21 5:11

>>6
I like how strnlen_s requires you have an idea of the length of the string before you get the length of the string.

Name: Anonymous 2016-01-21 7:16

>>8
Yo dawg, I heard you like lengths...

Name: Cudder !cXCudderUE 2016-01-21 8:25

>>6-8

Most people have absolutely no trouble figuring out how big things are IRL, yet somehow we are lead to believe that they are incapable of doing the very basic arithmetic required to determine the equivalent thing when working with things of varying lengths inside a computer? Ridiculous.

Name: Anonymous 2016-01-21 11:10

>>10
Check 'em

Name: Anonymous 2016-01-21 18:37

>>1
C isn't bloated, its libc.
C doesn't have a dependency on the runtime unlike most languages and you can roll your own libc or use an alternative.

Name: Anonymous 2016-01-22 8:59

>>12
The standard library is part of C.

C doesn't have a dependency on the runtime unlike most languages and you can roll your own libc or use an alternative.
No.

Name: Anonymous 2016-01-22 10:11

Name: Anonymous 2016-01-22 20:22

>>14
Offtopic

Name: Anonymous 2016-01-22 21:08

>>13
No.
See 5.1.2.1 Freestanding environment

Name: Anonymous 2016-01-22 21:23

C89 $2.1.2.1
[..] the name and type of the function called at program startup are implementation-defined. There are otherwise no reserved external identifiers. Any library facilities available to a freestanding program are implementation-defined.

>>1
printf/fprintf/sprintf/snprintf/vprintf/vfprintf/vsprintf/vsnprintf
Pretty sure the core functionality is often implemented only once (e.g. in snprintf()) and then wrappers are built around, like with malloc(), which is often just a call to realloc().

And yes, wchar_t really seems stupid. I never understood it. Maybe someone cares to explain?

Name: Anonymous 2016-01-22 21:30

>>16
What with that? It still has a standard library (stddef.h, limits.h, etc)

Name: Anonymous 2016-01-22 21:32

>>18
And even then, it's still part of C, even if optional.

Name: Anonymous 2016-01-22 21:38

>>18
None of those require any runtime support.

Name: Anonymous 2016-01-22 22:02

>>20
Nice assumption.

Name: Anonymous 2016-01-22 22:31

>>21
Not an assumption.

Name: Anonymous 2016-01-22 23:07

>>22
Yes, it is.

Name: Anonymous 2016-01-22 23:25

>>23
Nice assumption.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List