Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #123506

Re: "The long goodbye to C" by Eric Raymond

From Ian Collins <ian-news@hotmail.com>
Newsgroups comp.lang.c
Subject Re: "The long goodbye to C" by Eric Raymond
Date 2017-11-26 14:19 +1300
Message-ID <f7uj4aF1omrU20@mid.individual.net> (permalink)
References (23 earlier) <hChSB.57907$U41.3798@fx07.am4> <f7tvl3F1omrU15@mid.individual.net> <wQkSB.52925$321.3234@fx12.am4> <f7ualpF1omrU16@mid.individual.net> <16nSB.76305$FA7.41515@fx16.am4>

Show all headers | View raw


On 11/26/2017 12:34 PM, bartc wrote:
> On 25/11/2017 22:54, Ian Collins wrote:
>> On 11/26/2017 09:59 AM, bartc wrote:
> 
>>> C however has existed with that PROBLEM for decades, and has been/has
>>> had to be used on a hundred compilers that didn't have that workaround.
>>
>> They do now, so move on.
> 
> I tried -Wmisleading-indentation on my gcc. It said 'unrecognised
> command line option'. Apparently this was introduced in v6, and an
> article I've just seen about the new feature was dated about 18 months ago.
> 
> So, if we were having this discussion two years ago, what would you have
> said then? And why, in fact, did gcc v6 introduce it? And why did it
> take them 30 years?

I would have said what I said here, coding standards exist for a good 
reasons.  Every one I have ever used required braces to avoid the 
dangling else bug, just as they prohibited multiple variable 
declarations on one line.  Everyone knew there were potential bugs, so 
we used good discipline (and decent unit tests and reviews) to avoid them.

> Is it possible that errors arising from the misuse of braces were a real
> problem in C? Note that my list of 100 C things was created in 2014, and
> I first had misgivings about braces in the early 80s.
> 
> You CAN'T dismiss a long-standing issue with a language on the grounds
> that a workaround was introduced yesterday, on one tool out of dozens,
> and pretend it never was a problem. And you can't realistically suggest
> everyone throws away their current tools and use only gcc v6 and later.

No one is dismissing the issue, we know it's there and know how to avoid 
it.  It is a trivial exercise to compile your code with whatever 
compiler you like.  My current project uses at least three, currently 4 
as we prepare to transition to a new target compiler.  In that set I 
include the SVN head of clang which regularly uncovers bits of crufty 
code that have gone unnoticed by previous eyes and tools.

-- 
Ian.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: "The long goodbye to C" by Eric Raymond ruben safir <ruben@mrbrklyn.com> - 2017-11-25 11:46 -0500
  Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-25 17:19 +0000
    Re: "The long goodbye to C" by Eric Raymond Ian Collins <ian-news@hotmail.com> - 2017-11-26 08:46 +1300
      Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-25 20:59 +0000
        Re: "The long goodbye to C" by Eric Raymond Ian Collins <ian-news@hotmail.com> - 2017-11-26 11:54 +1300
          Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-25 23:34 +0000
            Re: "The long goodbye to C" by Eric Raymond Ian Collins <ian-news@hotmail.com> - 2017-11-26 14:19 +1300
              Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-26 11:39 +0000
                Re: "The long goodbye to C" by Eric Raymond David Brown <david.brown@hesbynett.no> - 2017-11-26 13:20 +0100
                Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-26 13:43 +0000
                Re: "The long goodbye to C" by Eric Raymond David Brown <david.brown@hesbynett.no> - 2017-11-26 17:32 +0100
                Re: "The long goodbye to C" by Eric Raymond bartc <bc@freeuk.com> - 2017-11-26 17:31 +0000
                Re: "The long goodbye to C" by Eric Raymond David Brown <david.brown@hesbynett.no> - 2017-11-26 22:11 +0100
      Re: "The long goodbye to C" by Eric Raymond Gareth Owen <gwowen@gmail.com> - 2017-11-26 06:53 +0000

csiph-web