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


Groups > comp.lang.c > #162767 > unrolled thread

C23 (C2x) changes

Started byMehdi Amini <atorrses@gmail.com>
First post2021-09-20 10:54 +0430
Last post2021-10-21 13:15 +0200
Articles 19 on this page of 119 — 23 participants

Back to article view | Back to comp.lang.c


Contents

  C23 (C2x) changes Mehdi Amini <atorrses@gmail.com> - 2021-09-20 10:54 +0430
    Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-20 09:35 +0200
      Re: C23 (C2x) changes Mehdi Amini <atorrses@gmail.com> - 2021-09-21 11:01 +0430
    Re: C23 (C2x) changes John Bode <jfbode1029@gmail.com> - 2021-09-20 10:41 -0500
      Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-20 18:17 +0200
        Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-20 18:55 +0100
          Re: C23 (C2x) changes scott@slp53.sl.home (Scott Lurndal) - 2021-09-20 18:21 +0000
          Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-20 21:39 +0200
            Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-20 21:07 +0100
              Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-20 22:59 +0200
                Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-20 22:29 +0100
                  Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-20 17:43 -0700
                  Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-21 17:56 +0200
                    Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-21 18:05 +0100
                      Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-21 11:42 -0700
                      Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-22 11:37 +0200
                        Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-22 11:55 +0100
                          Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-22 14:21 +0200
                            Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-22 13:58 +0100
                    Re: C23 (C2x) changes Ian Pilcher <arequipeno@gmail.com> - 2021-09-22 12:02 -0500
                      Re: C23 (C2x) changes scott@slp53.sl.home (Scott Lurndal) - 2021-09-22 17:19 +0000
            Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-20 23:05 +0100
              Re: C23 (C2x) changes scott@slp53.sl.home (Scott Lurndal) - 2021-09-20 22:47 +0000
                Re: C23 (C2x) changes Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-09-20 22:58 +0000
                Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-02 07:16 -0700
                  Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-02 15:15 +0000
              Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-20 17:45 -0700
          Re: C23 (C2x) changes Manfred <noname@add.invalid> - 2021-09-27 17:15 +0200
            Re: C23 (C2x) changes Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-09-27 17:38 +0100
              Re: C23 (C2x) changes Manfred <noname@add.invalid> - 2021-09-27 23:18 +0200
                Re: C23 (C2x) changes antispam@math.uni.wroc.pl - 2021-09-28 13:53 +0000
                Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-02 08:07 -0700
                  Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-02 15:18 +0000
                    Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-02 15:04 -0700
                      Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-03 01:58 +0000
                        Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-02 22:06 -0700
                          Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-03 10:43 +0000
                            Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-03 13:30 -0700
                              Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 05:04 +0000
                                Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-03 23:24 -0700
                                  Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 06:54 +0000
                                Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-10-04 09:58 +0200
                                  Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 15:52 +0000
                                    Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-04 10:45 -0700
                                      Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 20:30 +0000
                                      Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-06 03:57 -0700
                                        Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-06 12:27 +0000
            Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-29 03:38 +0000
        Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-10-15 11:35 +0100
          Re: C23 (C2x) changes Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-10-15 18:27 +0000
            Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-10-15 20:08 +0100
            Re: C23 (C2x) changes Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-10-15 19:20 +0000
              Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-10-15 21:50 +0100
      Re: C23 (C2x) changes Florian Weimer <fw@deneb.enyo.de> - 2021-10-03 09:43 +0200
        Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-10-03 18:53 +0200
        Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-03 13:55 -0700
    Re: C23 (C2x) changes William Ahern <william@25thandClement.com> - 2021-09-21 22:57 -0700
      Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-02 08:55 -0700
        Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-02 16:36 +0000
    Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-09-22 20:27 +0200
      Re: C23 (C2x) changes Philipp Klaus Krause <pkk@spth.de> - 2021-09-22 22:25 +0200
        Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-22 14:05 -0700
          Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-09-22 23:24 +0100
            Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-09-22 18:49 -0700
          Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-09-23 18:47 +0200
    Static bounds checking (was Re: C23 (C2x) changes) William Ahern <william@25thandClement.com> - 2021-09-23 21:11 -0700
      Re: Static bounds checking (was Re: C23 (C2x) changes) David Brown <david.brown@hesbynett.no> - 2021-09-24 08:51 +0200
        Re: Static bounds checking (was Re: C23 (C2x) changes) Philipp Klaus Krause <pkk@spth.de> - 2021-09-24 09:30 +0200
      Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-24 07:52 +0000
        Re: Static bounds checking (was Re: C23 (C2x) changes) Philipp Klaus Krause <pkk@spth.de> - 2021-09-24 12:32 +0200
          Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-24 10:49 +0000
            Re: Static bounds checking (was Re: C23 (C2x) changes) Philipp Klaus Krause <pkk@spth.de> - 2021-09-24 14:46 +0200
        Re: Static bounds checking (was Re: C23 (C2x) changes) Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-24 18:14 +0200
          Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-25 01:00 +0000
            Re: Static bounds checking (was Re: C23 (C2x) changes) Philipp Klaus Krause <pkk@spth.de> - 2021-09-25 07:44 +0200
              Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-25 11:28 +0000
              Re: Static bounds checking (was Re: C23 (C2x) changes) antispam@math.uni.wroc.pl - 2021-09-28 10:56 +0000
            Re: Static bounds checking (was Re: C23 (C2x) changes) Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-25 09:48 +0200
              Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-25 11:30 +0000
                Re: Static bounds checking (was Re: C23 (C2x) changes) Kaz Kylheku <480-992-1380@kylheku.com> - 2021-09-25 20:49 +0000
                  Re: Static bounds checking (was Re: C23 (C2x) changes) Branimir Maksimovic <branimir.maksimovic@gmail.com> - 2021-09-26 00:04 +0000
                Re: Static bounds checking (was Re: C23 (C2x) changes) Bonita Montero <Bonita.Montero@gmail.com> - 2021-09-26 06:56 +0200
    Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-09-27 10:15 -0700
      Re: C23 (C2x) changes Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-09-27 11:15 -0700
        Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-09-27 22:11 +0200
        Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-09-27 14:20 -0700
          Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-09-27 14:31 -0700
        Re: C23 (C2x) changes Mehdi Amini <atorrses@gmail.com> - 2021-09-28 10:43 +0330
    Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-06 04:01 -0700
      Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-10-06 04:42 -0700
        Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 04:04 -0700
          Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-10-29 16:34 +0200
      Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-10-06 19:07 +0200
        Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-10-07 11:06 +0200
          Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-10-07 19:31 +0200
            Re: C23 (C2x) changes David Brown <david.brown@hesbynett.no> - 2021-10-07 22:14 +0200
              Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 06:18 -0700
                Re: C23 (C2x) changes Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 06:21 -0700
        Re: C23 (C2x) changes Tim Rentsch <tr.17687@z991.linuxsc.com> - 2021-10-29 04:01 -0700
      Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-15 12:59 +0200
        Re: C23 (C2x) changes Jim Jackson <jj@franjam.org.uk> - 2021-10-15 16:50 +0000
          Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-16 07:51 +0200
            Re: C23 (C2x) changes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-16 11:50 -0700
              Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-16 21:28 +0200
                Re: C23 (C2x) changes Jim Jackson <jj@franjam.org.uk> - 2021-10-17 17:18 +0000
                  Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-17 20:00 +0200
                    Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-10-17 19:17 +0100
                      Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-18 06:49 +0200
                        Re: C23 (C2x) changes Bart <bc@freeuk.com> - 2021-10-18 11:23 +0100
                          Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-18 14:09 +0200
                    Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-21 01:07 +0000
                  Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-21 01:02 +0000
            Re: C23 (C2x) changes Guillaume <message@bottle.org> - 2021-10-16 21:28 +0200
              Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-17 06:04 +0200
                Re: C23 (C2x) changes Manfred <noname@add.invalid> - 2021-10-17 19:35 +0200
                  Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-17 20:01 +0200
                    Re: C23 (C2x) changes "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2021-10-17 14:15 -0700
                Re: C23 (C2x) changes Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-21 01:02 +0000
                  Re: C23 (C2x) changes Bonita Montero <Bonita.Montero@gmail.com> - 2021-10-21 13:15 +0200

Page 6 of 6 — ← Prev page 1 2 3 4 5 [6]


#163096

FromJim Jackson <jj@franjam.org.uk>
Date2021-10-15 16:50 +0000
Message-ID<slrnsmjcan.8iv.jj@iridium.wf32df>
In reply to#163094
On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> My impression is that as time goes on C is looking more and
>> more like C++ and less and less like C.  That's a bad trend.
>
> C should be dropped in favour of C++ for almost any project. With C
> you have a dramatic less development-performance and make much more
> bugs. If Chrome f.e. would be developed in C, it would be at least
> five times the code and ten times the number of bugs.

So you reckon if you re-code the linux kernel in C++ it would be 5 times 
less code and 10 times less buggy?

sssshhhh....

[toc] | [prev] | [next] | [standalone]


#163101

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-16 07:51 +0200
Message-ID<skdp9s$i4b$1@dont-email.me>
In reply to#163096
Am 15.10.2021 um 18:50 schrieb Jim Jackson:
> On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>> My impression is that as time goes on C is looking more and
>>> more like C++ and less and less like C.  That's a bad trend.
>>
>> C should be dropped in favour of C++ for almost any project. With C
>> you have a dramatic less development-performance and make much more
>> bugs. If Chrome f.e. would be developed in C, it would be at least
>> five times the code and ten times the number of bugs.
> 
> So you reckon if you re-code the linux kernel in C++ it would be 5 times
> less code and 10 times less buggy?

I think the Linux-kernel isn't such complex as Chrome.
But the code-size would be a fraction in C++.

[toc] | [prev] | [next] | [standalone]


#163103

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2021-10-16 11:50 -0700
Message-ID<skf6to$fqs$1@dont-email.me>
In reply to#163101
On 10/15/2021 10:51 PM, Bonita Montero wrote:
> Am 15.10.2021 um 18:50 schrieb Jim Jackson:
>> On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>> My impression is that as time goes on C is looking more and
>>>> more like C++ and less and less like C.  That's a bad trend.
>>>
>>> C should be dropped in favour of C++ for almost any project. With C
>>> you have a dramatic less development-performance and make much more
>>> bugs. If Chrome f.e. would be developed in C, it would be at least
>>> five times the code and ten times the number of bugs.
>>
>> So you reckon if you re-code the linux kernel in C++ it would be 5 times
>> less code and 10 times less buggy?
> 
> I think the Linux-kernel isn't such complex as Chrome.

Really?

> But the code-size would be a fraction in C++.
> 

[toc] | [prev] | [next] | [standalone]


#163104

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-16 21:28 +0200
Message-ID<skf94f$v13$1@dont-email.me>
In reply to#163103
Am 16.10.2021 um 20:50 schrieb Chris M. Thomasson:
> On 10/15/2021 10:51 PM, Bonita Montero wrote:
>> Am 15.10.2021 um 18:50 schrieb Jim Jackson:
>>> On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>> My impression is that as time goes on C is looking more and
>>>>> more like C++ and less and less like C.  That's a bad trend.
>>>>
>>>> C should be dropped in favour of C++ for almost any project. With C
>>>> you have a dramatic less development-performance and make much more
>>>> bugs. If Chrome f.e. would be developed in C, it would be at least
>>>> five times the code and ten times the number of bugs.
>>>
>>> So you reckon if you re-code the linux kernel in C++ it would be 5 times
>>> less code and 10 times less buggy?
>>
>> I think the Linux-kernel isn't such complex as Chrome.
> 
> Really?

Think that Chrome would be at least five times the line-count if it
would be written in C. I bet it would be impossible to write stl like
Chrome in C. Look at the Oracle DB server: 25 mio lines of C and lots
of bugs fixed regulary. Such complex softare would be handled much
easier in C++.

[toc] | [prev] | [next] | [standalone]


#163107

FromJim Jackson <jj@franjam.org.uk>
Date2021-10-17 17:18 +0000
Message-ID<slrnsmommo.fm5.jj@iridium.wf32df>
In reply to#163104
On 2021-10-16, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 16.10.2021 um 20:50 schrieb Chris M. Thomasson:
>> On 10/15/2021 10:51 PM, Bonita Montero wrote:
>>> Am 15.10.2021 um 18:50 schrieb Jim Jackson:
>>>> On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>>> My impression is that as time goes on C is looking more and
>>>>>> more like C++ and less and less like C.?? That's a bad trend.
>>>>>
>>>>> C should be dropped in favour of C++ for almost any project. With C
>>>>> you have a dramatic less development-performance and make much more
>>>>> bugs. If Chrome f.e. would be developed in C, it would be at least
>>>>> five times the code and ten times the number of bugs.
>>>>
>>>> So you reckon if you re-code the linux kernel in C++ it would be 5 times
>>>> less code and 10 times less buggy?
>>>
>>> I think the Linux-kernel isn't such complex as Chrome.
>> 
>> Really?
>
> Think that Chrome would be at least five times the line-count if it
> would be written in C. I bet it would be impossible to write stl like
> Chrome in C. Look at the Oracle DB server: 25 mio lines of C and lots
> of bugs fixed regulary. Such complex softare would be handled much
> easier in C++.

Linux currently has about 27 million lines of code.

I think you may be right about C++ for many userland graphical programs. 
Can you name an OS written in C++?

[toc] | [prev] | [next] | [standalone]


#163109

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-17 20:00 +0200
Message-ID<skhoc0$arv$1@dont-email.me>
In reply to#163107
> Linux currently has about 27 million lines of code.
> I think you may be right about C++ for many userland graphical programs.
> Can you name an OS written in C++?

Symbian and Haiku.
That's not a matter of necesities that most operating systems are
written in C, that's just a matter of the writer's mindeset. Writing
an operating system in C++ would result in much less code and much
less bugs - if you use the language properly.

[toc] | [prev] | [next] | [standalone]


#163111

FromBart <bc@freeuk.com>
Date2021-10-17 19:17 +0100
Message-ID<skhpce$jbs$1@dont-email.me>
In reply to#163109
On 17/10/2021 19:00, Bonita Montero wrote:
>> Linux currently has about 27 million lines of code.
>> I think you may be right about C++ for many userland graphical programs.
>> Can you name an OS written in C++?
> 
> Symbian and Haiku.
> That's not a matter of necesities that most operating systems are
> written in C, that's just a matter of the writer's mindeset. Writing
> an operating system in C++ would result in much less code

Less code that /you/ have to write. Until you expand all those 
templates. Overall, it might be a different picture.

That's assuming you make use of that ability to keep user-code shorter.

The examples I've seen of yours, is to take advantage of all those toys 
to make user-code /more/ complicated.

[toc] | [prev] | [next] | [standalone]


#163113

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-18 06:49 +0200
Message-ID<skiucf$s55$1@dont-email.me>
In reply to#163111
> Less code that /you/ have to write. Until you expand all
> those  templates. Overall, it might be a different picture.

Do you think someone inspects the code expanded through templates ?
No one does that.

> The examples I've seen of yours, is to take advantage of all those
> toys  to make user-code /more/ complicated.

That's wrong. C++ almost always results in simpler code.

[toc] | [prev] | [next] | [standalone]


#163114

FromBart <bc@freeuk.com>
Date2021-10-18 11:23 +0100
Message-ID<skjhuk$u9n$1@dont-email.me>
In reply to#163113
On 18/10/2021 05:49, Bonita Montero wrote:
>> Less code that /you/ have to write. Until you expand all
>> those  templates. Overall, it might be a different picture.
> 
> Do you think someone inspects the code expanded through templates ?
> No one does that.

It might be an issue if the resulting binary is several times the size 
of the C equivalent.

>> The examples I've seen of yours, is to take advantage of all those
>> toys  to make user-code /more/ complicated.
> 
> That's wrong. C++ almost always results in simpler code.

That was my point. It /could/ do (setting aside C++'s busy syntax). But 
all examples of yours look like gobbledygook, even making use of those 
libraries. It seems like you're just pulling in all those extra features 
because you can.

[toc] | [prev] | [next] | [standalone]


#163115

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-18 14:09 +0200
Message-ID<skjo69$pvd$1@dont-email.me>
In reply to#163114
>> Do you think someone inspects the code expanded through templates ?
>> No one does that.

> It might be an issue if the resulting binary is several times the size 
> of the C equivalent.

Why should that be so ? The only thing that takes more space are the
tables for table-driven exception-handling, but this code isn't usually
executed. The other code is the same as you would write it manually in
C, but it takes much less time to write.

>> That's wrong. C++ almost always results in simpler code.

> That was my point. It /could/ do (setting aside C++'s busy syntax). But 
> all examples of yours look like gobbledygook, ...

That's not true.
I've always received a lot of praise for my coding-style.

[toc] | [prev] | [next] | [standalone]


#163118

FromBranimir Maksimovic <branimir.maksimovic@icloud.com>
Date2021-10-21 01:07 +0000
Message-ID<533cJ.2310$1n1.194@fx48.iad>
In reply to#163109
On 2021-10-17, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Linux currently has about 27 million lines of code.
>> I think you may be right about C++ for many userland graphical programs.
>> Can you name an OS written in C++?
>
> Symbian and Haiku.
True Symbian is DEAD, let LIVE "Haiku :P



-- 

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

[toc] | [prev] | [next] | [standalone]


#163117

FromBranimir Maksimovic <branimir.maksimovic@icloud.com>
Date2021-10-21 01:02 +0000
Message-ID<7%2cJ.2543$oo4.566@fx02.iad>
In reply to#163107
On 2021-10-17, Jim Jackson <jj@franjam.org.uk> wrote:
> On 2021-10-16, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 16.10.2021 um 20:50 schrieb Chris M. Thomasson:
>>> On 10/15/2021 10:51 PM, Bonita Montero wrote:
>>>> Am 15.10.2021 um 18:50 schrieb Jim Jackson:
>>>>> On 2021-10-15, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>>>>>>> My impression is that as time goes on C is looking more and
>>>>>>> more like C++ and less and less like C.?? That's a bad trend.
>>>>>>
>>>>>> C should be dropped in favour of C++ for almost any project. With C
>>>>>> you have a dramatic less development-performance and make much more
>>>>>> bugs. If Chrome f.e. would be developed in C, it would be at least
>>>>>> five times the code and ten times the number of bugs.
>>>>>
>>>>> So you reckon if you re-code the linux kernel in C++ it would be 5 times
>>>>> less code and 10 times less buggy?
>>>>
>>>> I think the Linux-kernel isn't such complex as Chrome.
>>> 
>>> Really?
>>
>> Think that Chrome would be at least five times the line-count if it
>> would be written in C. I bet it would be impossible to write stl like
>> Chrome in C. Look at the Oracle DB server: 25 mio lines of C and lots
>> of bugs fixed regulary. Such complex softare would be handled much
>> easier in C++.
>
> Linux currently has about 27 million lines of code.
>
> I think you may be right about C++ for many userland graphical programs. 
> Can you name an OS written in C++?
>

That would be interresting venture :P
>


-- 

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

[toc] | [prev] | [next] | [standalone]


#163105

FromGuillaume <message@bottle.org>
Date2021-10-16 21:28 +0200
Message-ID<skf94t$11fp$1@gioia.aioe.org>
In reply to#163101
Le 16/10/2021 à 07:51, Bonita Montero a écrit :
> I think the Linux-kernel isn't such complex as Chrome.
> But the code-size would be a fraction in C++.

First you need to tell us what you mean by code size.
To many people, "code size" is actually the size of the binary code. But 
I suppose you are talking about source code here? (If we were talking 
about binary code size, I'd venture that the opposite would be true. The 
size would be likely to be significantly bigger.)

Anyway, this is a very common statement, regardless of the project, that 
using C++ would invariably lead to fewer lines of code. But except for 
small examples tailored just to show that, I have yet to see a formal 
study clearly showing the point. And I have seen a lot of C++ projects 
that were horribly bloated, unnecessarily complex and with a un 
unreasonablme mess of class hierarchies.

But beyond that, does fewer lines of code always mean less coding effort 
and easier maintenance? Not necessarily.

Feel free to rewrite the Linux kernel in C++ though. Or write your own 
kernel with equivalent functionality. Don't forget to write it such that 
it can survive 30 years without major rewrites every couple of years. 
And we'll talk.

[toc] | [prev] | [next] | [standalone]


#163106

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-17 06:04 +0200
Message-ID<skg7bg$57r$1@dont-email.me>
In reply to#163105
Am 16.10.2021 um 21:28 schrieb Guillaume:
> Le 16/10/2021 à 07:51, Bonita Montero a écrit :
>> I think the Linux-kernel isn't such complex as Chrome.
>> But the code-size would be a fraction in C++.
> 
> First you need to tell us what you mean by code size.
> To many people, "code size" is actually the size of the binary code. But 
> I suppose you are talking about source code here? (If we were talking 
> about binary code size, I'd venture that the opposite would be true. The 
> size would be likely to be significantly bigger.)

Yes, I'm talking about the LOCs.

> Anyway, this is a very common statement, regardless of the project, that 
> using C++ would invariably lead to fewer lines of code. But except for 
> small examples tailored just to show that, I have yet to see a formal 
> study clearly showing the point. And I have seen a lot of C++ projects 
> that were horribly bloated, unnecessarily complex and with a un 
> unreasonablme mess of class hierarchies.

With C++ you've usually much less complexity.

[toc] | [prev] | [next] | [standalone]


#163108

FromManfred <noname@add.invalid>
Date2021-10-17 19:35 +0200
Message-ID<skhmtq$1ghs$1@gioia.aioe.org>
In reply to#163106
On 10/17/2021 6:04 AM, Bonita Montero wrote:
> Am 16.10.2021 um 21:28 schrieb Guillaume:
>> Le 16/10/2021 à 07:51, Bonita Montero a écrit :
>>> I think the Linux-kernel isn't such complex as Chrome.
>>> But the code-size would be a fraction in C++.
>>
>> First you need to tell us what you mean by code size.
>> To many people, "code size" is actually the size of the binary code. 
>> But I suppose you are talking about source code here? (If we were 
>> talking about binary code size, I'd venture that the opposite would be 
>> true. The size would be likely to be significantly bigger.)
> 
> Yes, I'm talking about the LOCs.

As Guillame said, this is not really a measure of code efficiency:

> But beyond that, does fewer lines of code always mean less coding effort and easier maintenance? Not necessarily.

> 
>> Anyway, this is a very common statement, regardless of the project, 
>> that using C++ would invariably lead to fewer lines of code. But 
>> except for small examples tailored just to show that, I have yet to 
>> see a formal study clearly showing the point. And I have seen a lot of 
>> C++ projects that were horribly bloated, unnecessarily complex and 
>> with a un unreasonablme mess of class hierarchies.
> 
> With C++ you've usually much less complexity.

That is not properly accurate, I'd rephrase:

C++ is better equipped for managing complexity, yes.

But, depending on the problem domain, many problems get a simpler and 
more efficient solution from C than C++.

Which is no surprise, it is in fact the reason for which C code can be 
compiled by C++ compilers - in other words, the reason why C++ has been 
thought of as a superset of C.

(If you limit yourself to Windows application programming then yes, C++ 
makes life easier than C does)

[toc] | [prev] | [next] | [standalone]


#163110

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-17 20:01 +0200
Message-ID<skhoe5$arv$2@dont-email.me>
In reply to#163108
> But, depending on the problem domain, many problems get a simpler and 
> more efficient solution from C than C++.

That's wrong. Its easier to structure all complex data-structures and
algorithms in C++.

[toc] | [prev] | [next] | [standalone]


#163112

From"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Date2021-10-17 14:15 -0700
Message-ID<ski3pr$puc$1@dont-email.me>
In reply to#163110
On 10/17/2021 11:01 AM, Bonita Montero wrote:
>> But, depending on the problem domain, many problems get a simpler and 
>> more efficient solution from C than C++.
> 
> That's wrong. Its easier to structure all complex data-structures and
> algorithms in C++.
> 

Its a lot easier to export a stable API in C. However, writing a kernel 
in C++ is doable, but a bit tricky because you have to be extra careful. 
Check this code out, NT 4.0 kernel, C galore... ;^)

https://github.com/ZoloZiak/WinNT4/tree/master/private/ntos

I wonder what this would look like in C++. Humm... I wonder if they are 
using C++ for Win11? Anybody know?

[toc] | [prev] | [next] | [standalone]


#163116

FromBranimir Maksimovic <branimir.maksimovic@icloud.com>
Date2021-10-21 01:02 +0000
Message-ID<d_2cJ.2542$oo4.2056@fx02.iad>
In reply to#163106
On 2021-10-17, Bonita Montero <Bonita.Montero@gmail.com> wrote:
> Am 16.10.2021 um 21:28 schrieb Guillaume:
>> Le 16/10/2021 à 07:51, Bonita Montero a écrit :
>>> I think the Linux-kernel isn't such complex as Chrome.
>>> But the code-size would be a fraction in C++.
>> 
>> First you need to tell us what you mean by code size.
>> To many people, "code size" is actually the size of the binary code. But 
>> I suppose you are talking about source code here? (If we were talking 
>> about binary code size, I'd venture that the opposite would be true. The 
>> size would be likely to be significantly bigger.)
>
> Yes, I'm talking about the LOCs.
>
>> Anyway, this is a very common statement, regardless of the project, that 
>> using C++ would invariably lead to fewer lines of code. But except for 
>> small examples tailored just to show that, I have yet to see a formal 
>> study clearly showing the point. And I have seen a lot of C++ projects 
>> that were horribly bloated, unnecessarily complex and with a un 
>> unreasonablme mess of class hierarchies.
>
> With C++ you've usually much less complexity.
Yes, but you have to be carefull with C++ as it is not readable
and complex. Few people can understand it ...

-- 

7-77-777
Evil Sinner!
with software, you repeat same experiment, expecting different results...

[toc] | [prev] | [next] | [standalone]


#163119

FromBonita Montero <Bonita.Montero@gmail.com>
Date2021-10-21 13:15 +0200
Message-ID<skri4e$4qd$2@dont-email.me>
In reply to#163116
Am 21.10.2021 um 03:02 schrieb Branimir Maksimovic:
> On 2021-10-17, Bonita Montero <Bonita.Montero@gmail.com> wrote:
>> Am 16.10.2021 um 21:28 schrieb Guillaume:
>>> Le 16/10/2021 à 07:51, Bonita Montero a écrit :
>>>> I think the Linux-kernel isn't such complex as Chrome.
>>>> But the code-size would be a fraction in C++.
>>>
>>> First you need to tell us what you mean by code size.
>>> To many people, "code size" is actually the size of the binary code. But
>>> I suppose you are talking about source code here? (If we were talking
>>> about binary code size, I'd venture that the opposite would be true. The
>>> size would be likely to be significantly bigger.)
>>
>> Yes, I'm talking about the LOCs.
>>
>>> Anyway, this is a very common statement, regardless of the project, that
>>> using C++ would invariably lead to fewer lines of code. But except for
>>> small examples tailored just to show that, I have yet to see a formal
>>> study clearly showing the point. And I have seen a lot of C++ projects
>>> that were horribly bloated, unnecessarily complex and with a un
>>> unreasonablme mess of class hierarchies.
>>
>> With C++ you've usually much less complexity.
> Yes, but you have to be carefull with C++ as it is not readable
> and complex. Few people can understand it ...

That depends on how you use it. But usually it's more
readable and if you use it properly it's impossible to
get the same readability in C.

[toc] | [prev] | [standalone]


Page 6 of 6 — ← Prev page 1 2 3 4 5 [6]

Back to top | Article view | comp.lang.c


csiph-web