This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C not stongly typed enough?

Hello all,
I have been following the recent clashes between various participants (see the post "Compiling differences between C51 v7.03 and v8.06" or "introducing the smoked sardine complex" :) :) ).
C was given, I think, a unjustified bash in that post. I wouldn't like to have been compelled to explicitly cast too often. Most potentially dangerous casts can be filtered out by a static code analyzer. Can you give an example of more strongly-typed languages than C that are used in embedded development?

Parents
  • Andy, all,
    I am a staunch believer that almost any programming language (except Cobol, maybe :) ), bestowed in the hands of a capable person, can get almost any job done!
    I don't have a problem with anybody bashing C, but other programming languages deserve a similar treatment (C++, for example, is much more dangerous to work with. classical example: transferring a pointer to a base class as a parameter to a function and treating it as an array! this is not defined). I thought that you were trying to say that certain problems can be solved better given a more strongly-typed tool. It's all a question of trade-off and capable hands, I think.
    Cactus Blip

Reply
  • Andy, all,
    I am a staunch believer that almost any programming language (except Cobol, maybe :) ), bestowed in the hands of a capable person, can get almost any job done!
    I don't have a problem with anybody bashing C, but other programming languages deserve a similar treatment (C++, for example, is much more dangerous to work with. classical example: transferring a pointer to a base class as a parameter to a function and treating it as an array! this is not defined). I thought that you were trying to say that certain problems can be solved better given a more strongly-typed tool. It's all a question of trade-off and capable hands, I think.
    Cactus Blip

Children