On Mon, Jul 05, 2021 at 12:24:18AM +0100, Derek Fawcus wrote:
On Sat, Jul 03, 2021 at 05:49:57PM +0200, Andy Kosela
wrote:
They also think that C is obsolete
I'd not say it is obsolete, but despite it having been my main language for the
last 30 years, these days I would be inclined to restrict the range of new tasks
I'd use it for.
So in thinking of how to solve certain problems, I'd split a subset of the problem
in to something in C, and the rest in to another language - probably Go. That may
simply reflect the nature of the problems I tackle, I can imagine that others
might not merit any use of C.
I had a systems people get together at my place maybe a year ago.
Kirk McKusick and Eric Allman came (as well as a bunch of others,
perhaps most notable was Pugs). I had a very pleasant chat with Eric
about programming styles. I came to the conclusion that I'd love working
with Eric, I think I could work for him and it's even possible he could
work for me. We both love C, we are both disciplined enough to write
maintainable/extendable code in C, it works for us. We really clicked
over our love of C.
I've tried to like other languages, Java is a huge tangled mess, C++ is,
well C++, every company that uses C++ has a list of things you are not
supposed to use, I tried to like Go, maybe I haven't given it enough of
a chance but it didn't grab me, lots of people I know have gone to Rust,
I tried to like that but, man, all the reinventing of syntax drove me
nuts, D seemed like it sort of was close but it changed the syntax too
much.
If I had infinite energy and money, I would fund a dialect of C that
made it more useful. The thing I hate about new programming languages
is they all feel the need to invent a new syntax. There are really
two syntaxes, C and Lisp (and that's a tip of a hat to Lisp, I'm not
a fan). Pick one of those and evolve it.
My whole career I've felt that when you add to the set of code that is
in the world, you should build on what people already know. Everyone
knows C syntax, yeah there are some areas that could do with a cleanup
(looking at you function pointer declarations) but for the most part,
most people can look at C code and know what it does. So why invent
a new syntax and invalidate all of that knowledge that everyone has?
For all its faults, C++ is the closest to a modern language that sort
of fits with what I want but it is a kitchen sink language. It really
wanted the Go trio to say "no" to a lot of stuff, it didn't have that
so it has every language feature you can imagine and it's hard to
onboard people to that. Harder yet to write maintainable code.
So, yeah, I like C. A lot. I wish it would evolve in a sensible way
but as a buddy says, we live in an imperfect world.
--lm