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

Pages: 1-

newfound love for C99?

Name: Anonymous 2012-08-12 17:27

What's with /prog/'s new love for C99, you used to be all about the C89...

Name: Anonymous 2012-08-12 17:27

/prog/ always hated C.

Name: Anonymous 2012-08-12 18:15

>>2
You weren't around here when we all were 12 and wrote our first ANSI C compilers, I see.

Name: sega 2012-08-12 18:19

| implying
im new here too :DD

Name: Anonymous 2012-08-12 18:29

#include <stdint.h>

Name: Anonymous 2012-08-12 18:46

'
>not using javascript

Name: Anonymous 2012-08-12 22:08

>>1
Clang/LLVM happened.

Name: Anonymous 2012-08-13 0:11

>>5
That's literally the only reason I've ever used C99.

Name: Anonymous 2012-08-13 0:22

>>8
Only reason I've ever used C99 was to declare variables in the for loops.

Name: Anonymous 2012-08-13 0:23

N-no thank you. C99 and C11 are SEPPLES quality. I'm sticking to C89.

Name: Anonymous 2012-08-13 7:30

C?
It ain't LISP, so no.

Name: Anonymous 2012-08-13 17:28

>>9
Gross.

Name: Anonymous 2012-08-13 21:36

>>9
Same here.

Name: Anonymous 2012-08-13 22:38

>>10
Sadly even by C89 they were starting to import SEPPLES features :(

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-08-14 5:51

The allowance of being able to declare your variables anywhere inside the body of a function may have been brought about by changes in compiler design.

Declaring everything at the beginning fits with the "one variable, one memory/register location" model that is extremely simple to implement in a compiler (especially if you restrict it to memory-only) but relatively inefficient. Allowing declarations in the middle makes the code more SSA-like and possibly better for the code generator/register allocator to handle.

Ideally, it shouldn't matter where you declare the variables, because they'll only be instantiated for the duration they're actually used - as a "flow of data" between computations.

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