Forum

How to C in 2016

Discuss anything not covered by any of the other categories.

Moderator: InsideQC Admins

How to C in 2016

Postby JasonX » Tue Jan 26, 2016 12:53 am

JasonX
 
Posts: 407
Joined: Tue Apr 21, 2009 2:08 pm

Re: How to C in 2016

Postby jitspoe » Sun Mar 06, 2016 5:20 am

Meanwhile, I'm too lazy to update my compiler (and don't want to risk breaking compatibility for some players), so I'm still using Visual Studio 2010, and half this stuff doesn't work. :)
jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: How to C in 2016

Postby Baker » Sat Mar 26, 2016 12:20 am

Sounds the guy who wrote that "advice" is big into unportable code that depends on whose compiler you are using. Maybe that works for him, his environment, the projects he works on and the operating systems that matter to him and the compilers he uses and doesn't use.

Someone saying there is "the one true way" hasn't poked his head out of a hole enough to know that.

C is a thin veneer over assembly language.

More recent C standards have few truly useful features over older C, so sacrificing portability and compile backwards compatibility to be "modern" isn't a very good reason in a lot of cases. Case in point, SDL2 is C-89 compatible as an example.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: How to C in 2016

Postby Spike » Sat Mar 26, 2016 8:41 am

baker, the only reason to stick to c89 is msvc, and even that is changing now - msvc2015 supposedly implements nearly the full c99 libc requirements (its missing a couple of twiddles, but I doubt you've ever used them).
so really, c89 is finally obsolete. its only the people using obsolete versions of microsoft's tool chains who still need to use it.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: How to C in 2016

Postby Baker » Sat Mar 26, 2016 9:04 am

Spike wrote:baker, the only reason to stick to c89 is msvc, and even that is changing now - msvc2015 supposedly implements nearly the full c99 libc requirements (its missing a couple of twiddles, but I doubt you've ever used them).
so really, c89 is finally obsolete. its only the people using obsolete versions of microsoft's tool chains who still need to use it.


That's nice to hear. I had always heard that Microsoft would never implement any of the more modern C implementations, so I haven't been paying much attention to new Visual Studio.

/Looks at C89 vs. C99 specs --- well, 5 or 6 of things would be nice.

a) Varadic macros ... but I think Visual Studio has supported those for a while
b) I would hope it supports varadic function sentinels (i.e. last arg must be null for certain functions) -- but I use gcc/clang to catch those.

Anyway, nice to see some improvements.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: How to C in 2016

Postby Baker » Sat Mar 26, 2016 11:44 pm

@spike --- does Visual Studio 2015 happen to have anonymous union support in C?

/If you know ...
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: How to C in 2016

Postby Spike » Sun Mar 27, 2016 9:54 am

older versions do, so I assume it must have.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest