Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Do you C?

Do you C?

Scheduled Pinned Locked Moved The Lounge
questionhtmlcomtoolstutorial
55 Posts 37 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Hans Dietrich

    Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

    Best wishes, Hans


    [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

    A Offline
    A Offline
    Anna Jayne Metcalfe
    wrote on last edited by
    #14

    Not anymore, unless there's a very good reason. I just find it far too limiting. :doh:

    Anna :rose: Having a bad bug day? Tech Blog | Anna's Place | Tears and Laughter "If mushy peas are the food of the devil, the stotty cake is the frisbee of God"

    C 1 Reply Last reply
    0
    • H Hans Dietrich

      Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

      Best wishes, Hans


      [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

      P Offline
      P Offline
      peterchen
      wrote on last edited by
      #15

      I *cough* know someone who does.

      Burning Chrome ^ | Linkify!| FoldWithUs! | sighist

      1 Reply Last reply
      0
      • H Hans Dietrich

        Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

        Best wishes, Hans


        [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

        N Offline
        N Offline
        Noam Sigal
        wrote on last edited by
        #16

        Yes! For embedded micro-controllers, communication and HW-related SW. We also program C++ (.Net, Borland), Java, C#. Our system and code are quite complex, involving several embedded platforms, PDA, several PC clients and servers, GUI, control, RT... you name it. Where we require portability, performance, and EASY MAINTENANCE - C is the #1 choice.

        noams66

        D 1 Reply Last reply
        0
        • H Hans Dietrich

          Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

          Best wishes, Hans


          [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #17

          C will never die, greatest things needs to be done in C. A real programmer writes C and assembler I am not very good with assembler so i am not a real programmer ;) For business, maybe C is not the better option, but for innovation, robotic, AI you need to have C on your mind, or every step of your personal robot will consume 200W of electricity and take 2 minutes to complete ;P C is better to export to another language that C++ :) lange Lebensdauer zu C!

          Saludos!! ____Juan

          1 Reply Last reply
          0
          • H Hans Dietrich

            Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

            Best wishes, Hans


            [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

            M Offline
            M Offline
            Mirds
            wrote on last edited by
            #18

            Of course I do. Work with really critical systems, such as avionics, does not allow you to use object oriented programming. So C and ADA are a must.

            P 1 Reply Last reply
            0
            • H Hans Dietrich

              Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

              Best wishes, Hans


              [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

              P Offline
              P Offline
              Paul Sanders the other one
              wrote on last edited by
              #19

              Having been a die-hard C programmer for many years, but now something of a convert, I can say that I would miss virtual functions (especially destructors) and inheritance. I know you can *do* it in C (more or less) but it's a pain. I use templates rarely, but occasionally they are a lifesaver (no more 50 line, impossible to debug #define's), and being able to declare local variables anywhere in the body of a function certainly makes my code that bit tidier. What I like about C++ is that if you use it wisely, it is as efficient as C. What I dislike about C++ is that it can be virtually impossible to follow, and be very inefficient, if abused. I could live without the STL personally, except for map which I use a lot for 'associative arrays' (read 'access by key'). Hell, anyone can code a linked list :) My favourite toy is a templated 'smart pointer' that deletes itself when it goes out of scope. Makes life a lot simpler and avoids a lot of bugs.

              Paul Sanders http://www.alpinesoft.co.uk

              1 Reply Last reply
              0
              • M Mirds

                Of course I do. Work with really critical systems, such as avionics, does not allow you to use object oriented programming. So C and ADA are a must.

                P Offline
                P Offline
                Paul Sanders the other one
                wrote on last edited by
                #20

                > Work with really critical systems, such as avionics, does not allow you to use object oriented programming. So C and ADA are a must. Why on earth not?

                Paul Sanders http://www.alpinesoft.co.uk

                M T 2 Replies Last reply
                0
                • H Hans Dietrich

                  Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                  Best wishes, Hans


                  [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                  M Offline
                  M Offline
                  Machaira
                  wrote on last edited by
                  #21

                  For general application development there's no reason to use C (or C++). Long live C#!

                  P C 2 Replies Last reply
                  0
                  • M Machaira

                    For general application development there's no reason to use C (or C++). Long live C#!

                    P Offline
                    P Offline
                    Paul Sanders the other one
                    wrote on last edited by
                    #22

                    I kind of agree with that, apart from the system requirements of the .Net framework - c# is a mich nicer language.

                    Paul Sanders http://www.alpinesoft.co.uk

                    1 Reply Last reply
                    0
                    • P Paul Sanders the other one

                      > Work with really critical systems, such as avionics, does not allow you to use object oriented programming. So C and ADA are a must. Why on earth not?

                      Paul Sanders http://www.alpinesoft.co.uk

                      M Offline
                      M Offline
                      Mirds
                      wrote on last edited by
                      #23

                      There is a norm called DO 178-B that says so. OOP is not safe enough to work unless you be extremely cautious about it, and very extremely cautious. So to prevent errors and, therefore, fatal accidents, OOP is forbidden to this date. A new review of the norm, the DO 178-C, is said to permit OOP under extreme controlled conditions. So, when you need to prove that your SW is bug-free, you just avoid at all costs to use OOP. Besides not using OOP, it is becoming more and more recommended the use of formal methods to help the proof of bug-free SW.

                      1 Reply Last reply
                      0
                      • H Hans Dietrich

                        Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                        Best wishes, Hans


                        [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                        C Offline
                        C Offline
                        CPallini
                        wrote on last edited by
                        #24

                        Yes, of course. :)

                        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                        [My articles]

                        1 Reply Last reply
                        0
                        • H Hans Dietrich

                          Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                          Best wishes, Hans


                          [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                          T Offline
                          T Offline
                          tom1443
                          wrote on last edited by
                          #25

                          I don't see C and Assembly being replaced in the embedded world too soon. Nobody I work with likes the idea. We tried C++ here, built a few overpriced and unmaintainable products and dropped it. And if I recall the most recent survey in Embedded Systems correctly, C++ adoption is on the decline in other places that do embedded work too. The C++ that we still do is for tools we develop and cutomer products that run on PCs like print clients.

                          _ 1 Reply Last reply
                          0
                          • P Paul Sanders the other one

                            > Work with really critical systems, such as avionics, does not allow you to use object oriented programming. So C and ADA are a must. Why on earth not?

                            Paul Sanders http://www.alpinesoft.co.uk

                            T Offline
                            T Offline
                            tom1443
                            wrote on last edited by
                            #26

                            Alot of it has to do with that fact that dynamic memory allocation is dangerous in an embedded system. When you can't grab a new chunk of memory you can't just pop up a window, tell the user and let the program exit. If that happens in a critical system spacecraft will crash, missles hit friendly targets, or trains run through control signals. In critical systems, static memory allocation is preferred.

                            P D 2 Replies Last reply
                            0
                            • T tom1443

                              Alot of it has to do with that fact that dynamic memory allocation is dangerous in an embedded system. When you can't grab a new chunk of memory you can't just pop up a window, tell the user and let the program exit. If that happens in a critical system spacecraft will crash, missles hit friendly targets, or trains run through control signals. In critical systems, static memory allocation is preferred.

                              P Offline
                              P Offline
                              Paul Sanders the other one
                              wrote on last edited by
                              #27

                              Yes, I can see the sense of that, although I would have thought that embedded systems built on modern hardware (and I know that not all are) would have ample memory. Seems to me actually that there's an argument here for a language like C# (or Java), with garbage collection and no 'free' function, as the chances of a potentially fatal memory leak are reduced. Hard to provide realtime guarantees with such a language though since GC can happen any old time.

                              Paul Sanders http://www.alpinesoft.co.uk

                              M P 2 Replies Last reply
                              0
                              • H Hans Dietrich

                                Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                                Best wishes, Hans


                                [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                                R Offline
                                R Offline
                                RTS WORK
                                wrote on last edited by
                                #28

                                Did a code review of some Open Source command line encryption algorithm written in C. Ended up re-building it to make sure the binary = source. Been like 20 years but it's all good.

                                1 Reply Last reply
                                0
                                • H Hans Dietrich

                                  Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                                  Best wishes, Hans


                                  [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                                  J Offline
                                  J Offline
                                  JudyL_MD
                                  wrote on last edited by
                                  #29

                                  But of course since among other things, I work on drivers Judy

                                  Be wary of strong drink. It can make you shoot at tax collectors - and miss. Lazarus Long, "Time Enough For Love" by Robert A. Heinlein

                                  1 Reply Last reply
                                  0
                                  • T tom1443

                                    I don't see C and Assembly being replaced in the embedded world too soon. Nobody I work with likes the idea. We tried C++ here, built a few overpriced and unmaintainable products and dropped it. And if I recall the most recent survey in Embedded Systems correctly, C++ adoption is on the decline in other places that do embedded work too. The C++ that we still do is for tools we develop and cutomer products that run on PCs like print clients.

                                    _ Offline
                                    _ Offline
                                    _dunk_
                                    wrote on last edited by
                                    #30

                                    tom1443 wrote:

                                    We tried C++ here, built a few overpriced and unmaintainable products and dropped it.

                                    To successfully switch from C to C++, you absolutely must understand and properly use OOP. At least for the core infrastructure at a minimum. Otherwise you end up with overpriced and unmaintable products as you get all the problems that come with structured design AND OO design if you do not. Don't blame the language for lack of skill on the developers part. There is absolutely no reason that C++ can't be successfully used in an embedded system short of having a lack of development tools for the particular embedded environment. There are just some extra details that an embedded developer needs to be concerned about (in particular memory management). C++ has been used on many embedded systems requiring the 5 9's availability level. With that said, there are some applications that are just more suited to structured development where C programming has a role, like drivers and algorithms.

                                    N 1 Reply Last reply
                                    0
                                    • H Hans Dietrich

                                      Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                                      Best wishes, Hans


                                      [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                                      C Offline
                                      C Offline
                                      CDMTJX
                                      wrote on last edited by
                                      #31

                                      Stuff here at work in in a variety of languages, including C. I prefer objects; C++, C#, or Java. char* string handling is possible, but painful!

                                      1 Reply Last reply
                                      0
                                      • H Hans Dietrich

                                        Long live C: http://www.theregister.co.uk/2009/01/21/open_source_projects_08/[^]

                                        Best wishes, Hans


                                        [CodeProject Forum Guidelines] [How To Ask A Question] [My Articles]

                                        E Offline
                                        E Offline
                                        etkid84
                                        wrote on last edited by
                                        #32

                                        propaganda from the Java and C# peeps who were too stupid to understand pointers. :cool:

                                        David

                                        H P 2 Replies Last reply
                                        0
                                        • P Paul Sanders the other one

                                          Yes, I can see the sense of that, although I would have thought that embedded systems built on modern hardware (and I know that not all are) would have ample memory. Seems to me actually that there's an argument here for a language like C# (or Java), with garbage collection and no 'free' function, as the chances of a potentially fatal memory leak are reduced. Hard to provide realtime guarantees with such a language though since GC can happen any old time.

                                          Paul Sanders http://www.alpinesoft.co.uk

                                          M Offline
                                          M Offline
                                          Mirds
                                          wrote on last edited by
                                          #33

                                          Besides that, doing "Modified Condition/Decision Coverage(MC/DC)" is already a pain in the ass with structured programming, imagine doing it in OOP. Stack overflow is also hard to guarantee in OOP.

                                          Paul Sanders (AlpineSoft) wrote:

                                          Yes, I can see the sense of that, although I would have thought that embedded systems built on modern hardware (and I know that not all are) would have ample memory. Seems to me actually that there's an argument here for a language like C# (or Java), with garbage collection and no 'free' function, as the chances of a potentially fatal memory leak are reduced. Hard to provide realtime guarantees with such a language though since GC can happen any old time. Paul Sanders http://www.alpinesoft.co.uk

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups