On Fri, Apr 29, 2016 at 12:59 PM, Ian S. King <isking at uw.edu> wrote:
C is a lot like that saw - it doesn't have a lot
of guards on it, and you
can do stupid things.
The problem is that C doesn't just allow you to do stupid things, it's
actively encouraged. C doesn't just let you aim at your foot, it
defaults to aiming at your foot.
C is not bad as a fairly portable assembly language, but it is NOT a
high-level language.
But you can do very powerful things that are
difficult or impossible in, say, Python, which is also a very good and
useful tool.
I've programmed in C professionally for 27 years, mostly doing OS
kernel, device driver, and network stack work. Aside from the
difference in runtime performance, I am hard-pressed to think of any
specific function I've ever written in C that couldn't be expressed
just as easily or even more so in Python. Obviously you can't write
kernel, driver, or network stack code for most kernels in Python, but
that's not due to any failings of the expressiveness of Python.
I'm occasionally asked what my favorite programming language is, and I
don't have a good answer, other than that in general I prefer
languages with type safety and memory safety. I like Java somewhat,
and I like Ada even more (recent versions have fixed most of the
deficiencies of the original Ada '83 standard). I like Modula 3
(which is much different than Modula 2), but have never had much
opportunity to use it. I'd like to learn Haskell, and perhaps OCaml,
but don't have the time to invest. More than 95% of my work is in C,
because that's what my clients demand, so people are usually surprised
to hear my opinion that C is a terrible choice for almost anything.
Don't blame the tools - blame an educational
system that doesn't teach
software engineering practice, but just teaches tools. "Hey, hold my beer
and watch this!" -- Ian
I agree, except that I don't believe there is actually such a thing as
"Software Engineering" yet, even though I've held jobs with the title
"Software Engineer".