wu :: forums
« wu :: forums - Dark corners of C »

Welcome, Guest. Please Login or Register.
Apr 19th, 2024, 11:06pm

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   cs
(Moderators: ThudnBlunder, SMQ, towr, Eigenray, william wu, Icarus, Grimbal)
   Dark corners of C
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Dark corners of C  (Read 10600 times)
Barukh
Uberpuzzler
*****






   


Gender: male
Posts: 2276
Dark corners of C  
« on: Mar 25th, 2013, 5:09am »
Quote Quote Modify Modify

It's not a puzzle, but it's cool.
IP Logged
peoplepower
Junior Member
**





   


Posts: 63
Re: Dark corners of C  
« Reply #1 on: Mar 25th, 2013, 5:37am »
Quote Quote Modify Modify

It turns out that auto was a good placeholder for a useful keyword in C++11.
IP Logged
Grimbal
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 7526
Re: Dark corners of C  
« Reply #2 on: Mar 25th, 2013, 5:40am »
Quote Quote Modify Modify

I hope it doesn't break the code that is making use of that keyword.  Roll Eyes
IP Logged
peoplepower
Junior Member
**





   


Posts: 63
Re: Dark corners of C  
« Reply #3 on: Mar 25th, 2013, 6:03am »
Quote Quote Modify Modify

Indeed, I cannot compile things like
auto int i = 0;
in the new standard.
 
Hm.. I would be hardpressed to figure out some ambiguous usage of auto.
IP Logged
SMQ
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 2084
Re: Dark corners of C  
« Reply #4 on: Mar 25th, 2013, 12:20pm »
Quote Quote Modify Modify

on Mar 25th, 2013, 6:03am, peoplepower wrote:
Hm.. I would be hardpressed to figure out some ambiguous usage of auto.

double a = 0.0;
auto b = a;

In C, b will be an int (because a missing type implies int); in C++0x, b will be a double (because the type of an auto variable is implied by the type of the expression assigned to it).
 
Fortunately, in earlier versions of C++ this is a compiler error, because the missing-type-implies-int rule is only in straight C, not C++. So it's only a potential ambiguity if you're attempting to compile straight-C code as C++0x.
 
--SMQ
« Last Edit: Mar 25th, 2013, 12:22pm by SMQ » IP Logged

--SMQ

peoplepower
Junior Member
**





   


Posts: 63
Re: Dark corners of C  
« Reply #5 on: Mar 25th, 2013, 6:10pm »
Quote Quote Modify Modify

Wow, I did not know that (probably for good reason).
IP Logged
bal
Junior Member
**





   


Posts: 59
Re: Dark corners of C  
« Reply #6 on: Jul 5th, 2014, 7:41am »
Quote Quote Modify Modify

It's great, I've never heard about these stuffs  Smiley
IP Logged

Vollmacht Muster | My Blog | My Gallstones | Resignation Letter Sample
JaneBD
Junior Member
**





   
WWW Email

Gender: female
Posts: 57
Re: Dark corners of C  
« Reply #7 on: Aug 5th, 2014, 3:10pm »
Quote Quote Modify Modify

I've never heard of this ... what exactly is "Dark corners of C" - I get you're referring to the programming language, but is there something new I've not learnt about it?
IP Logged

"Do or Do not, there is no try" - Yoda
A Work in Progress
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Dark corners of C  
« Reply #8 on: Aug 5th, 2014, 11:24pm »
Quote Quote Modify Modify

Just click the link and read the presentation.
It's things you can, but probably shouldn't, do in C, because they're weird and/or evil.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
JaneBD
Junior Member
**





   
WWW Email

Gender: female
Posts: 57
Re: Dark corners of C  
« Reply #9 on: Aug 6th, 2014, 6:11am »
Quote Quote Modify Modify

That's actually pretty cool, thanks for sharing it (:
IP Logged

"Do or Do not, there is no try" - Yoda
A Work in Progress
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board