[GoLUG] Writing an internet server

Barry Fishman barry at ecubist.org
Wed Aug 20 22:54:17 EDT 2025


On 2025-08-20 18:15:27 -04, Steve Litt wrote:
> On Wed, 20 Aug 2025 09:18:10 +0100 (GMT+01:00)
> kc-golug at chadwicks.me.uk wrote:
>
>> 19 Aug 2025 22:03:52 Barry Fishman <barry at ecubist.org>:
>
>
>> True to some extent but most of the issues are due to C/C++.
>
> Please don't put C and C++ in the same category. C is a very nice
> language, with a minimal instruction set, that a *careful* programmer
> can use to produce just about anything.

C was a great achievement for a computer language.  Its more than just a
nice language.  It has allowed me to write some remarkable code, such as
marshaling complex data structures in an out of files, in ways that I
haven't been able to do efficiently in any other language, old or new.
I am still impressed by it, but I don't use it anymore.

C does require careful programming.  Half my time and thought processes
get sidetracked focusing on building data structures and tearing them
down, rather than solving the problem I am working on.  More modern
languages may separate you from the data more and be less efficient, but
that space gives room for the compiler to take a bigger roll in
protecting against memory related bugs which are the major cause of
security issues.

It also is harder for the compiler to statically analyze C code.
Modern languages allow one to focus on expressing algorithms more
directly. Things that in C would require a function call, becomes built
into the language, so there is more room for the compiler to do higher
level optimization, which makes up some of the performance loss.

I also miss things like tail call optimization and especially lexical
closures, which I feel helps simplify my code.  Lexical closures are in
Vala and Rust, and I think the GCC compiler.

I have recently been looking at Go as a language.  It was written by
some of the AT&T Bell Labs team that gave us Unix and C.  They are now at
Google, in a similar corporate environment.  They seem to be trying to
come up with a language that is an evolutionary descendant of C.  There
also seems to be a GNU Go being actively developed.

It has much of the feel of C, but with inclusion of the common modern basic
data structures, garbage collection, and its own more Unix like take on how
a language should be put together.  It does unix-y things quite well,
although I find it does seem to lack some of the kind of structural
cohesion and elegance that Dennis Richie gave to C.

-- 
Barry Fishman


More information about the GoLUG mailing list