{"id":576,"date":"2009-11-16T08:00:10","date_gmt":"2009-11-16T07:00:10","guid":{"rendered":"https:\/\/blogs.mentor.com\/colinwalls\/?p=576"},"modified":"2026-03-26T16:31:21","modified_gmt":"2026-03-26T20:31:21","slug":"c-is-great-but","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/embedded-software\/2009\/11\/16\/c-is-great-but\/","title":{"rendered":"C is great, but&#8230;"},"content":{"rendered":"<p>As I am still off on my vacation, we have another guest blogger. This time it is <a href=\"mailto:meador_inge@mentor.com\">Meador Inge<\/a>, a member of the Mentor Graphics embedded software products engineering team, who, just like Scott <a href=\"https:\/\/blogs.mentor.com\/colinwalls\/blog\/2009\/11\/12\/droids-dropping-like-bombs\/\" target=\"_blank\" rel=\"noopener noreferrer\">last week<\/a>, has chosen a subject that interests me greatly and, by coincidence, picks up on theme that I <a href=\"https:\/\/blogs.mentor.com\/colinwalls\/blog\/2009\/11\/09\/parlez-vous-fortran\/\" target=\"_blank\" rel=\"noopener noreferrer\">highlighted recently<\/a>. -Colin<\/p>\n<p>C is great, but C alone makes you a bad programmer.  My introduction into computing started in a desktop-centric world.  My first love was programming languages and I was fortunate enough to spend several years of my professional career working on compilers.  As such, I came to value more the concepts that a programming language can offer rather than the instantiation of a particular concept in a particular programming language&#8230;<\/p>\n<p><!--more-->With this love of programming languages in mind my life took a very strange turn when I started to delve into <a href=\"http:\/\/www.mentor.com\/products\/embedded_software\/nucleus_rtos\/\" target=\"_blank\" rel=\"noopener noreferrer\">embedded programming for my work<\/a>.  I know the C programming language quite well, which is good, because that is all we really use in my workplace.  In fact that is all that several people I know in the embedded programming community ever use and ever want to use.<\/p>\n<p>On top of that, you typically find embedded programmers using a stricter form of C.  Sometimes I think I am living in some sort of programming <a href=\"http:\/\/en.wikipedia.org\/wiki\/Bizarro_World\" target=\"_blank\" rel=\"noopener noreferrer\">bizzaro world<\/a> where function calls (well, abstraction in general) are evil and macros and global variables are the bee&#8217;s knees.  The mere utter of the word recursion would probably get me fired (which is sad, because this is probable one of the most fundamental CS skills).<\/p>\n<p>I can&#8217;t imagine what would happen if I wanted to use a real programming language with concepts such as <a href=\"http:\/\/en.wikipedia.org\/wiki\/Higher-order_function\" target=\"_blank\" rel=\"noopener noreferrer\">first-class functions<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Closure_(computer_science)\" target=\"_blank\" rel=\"noopener noreferrer\">closures<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Duck_typing\" target=\"_blank\" rel=\"noopener noreferrer\">duck typing<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Reflection\" target=\"_blank\" rel=\"noopener noreferrer\">reflection<\/a>, and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Garbage_collection_(computer_science)\" target=\"_blank\" rel=\"noopener noreferrer\">garbage collection<\/a>.  It wouldn&#8217;t be pretty.  And, yes, I do understand the resource constraints of an embedded environment.  However, resource limitations should not limit you from exploring other options even if you can not apply those options.<\/p>\n<p>Who knows, maybe a language with some of these features could be applied in an embedded context in some limited form.  If I take the stance from the get-go that these features are bad things, then I am limiting my options.<\/p>\n<p>I am probably going to have to live with the fact that more powerful programming languages will not be used in most embedded projects.  I do, however, encourage folks to go out and learn other languages in their own time.  Learning a new computer language is about learning new concepts, concepts that transcend any language alone.<\/p>\n<p>C is great.  C is something that every programmer should learn at one point in time.  C alone may make you a wizard embedded programmer, but C alone will make you a bad programmer.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I am still off on my vacation, we have another guest blogger. This time it is Meador Inge, a&#8230;<\/p>\n","protected":false},"author":71677,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[313,300,340],"industry":[],"product":[],"coauthors":[],"class_list":["post-576","post","type-post","status-publish","format-standard","hentry","category-news","tag-c","tag-embedded-software","tag-programming-languages"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/users\/71677"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/576\/revisions"}],"predecessor-version":[{"id":9805,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/posts\/576\/revisions\/9805"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/tags?post=576"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/industry?post=576"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/product?post=576"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/embedded-software\/wp-json\/wp\/v2\/coauthors?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}