[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Redesigning Libvirt: Adopting use of a safe language



On Tue, Nov 14, 2017 at 17:27:01 +0000, Daniel Berrange wrote:
> The Problem(s)
> ==============

Note at first: This is a personal opinion. I'm not discrediting any
advantages a different language might have in technical sense.

I'm against this. Go is a utterly ugly language. It looks as the authors
wanted to be so hip so that they had to do a lot of stuff backwards.
Literally. Just look at variable declaration. While some concepts might
be cool, the rest of the stuff makes my eyes bleed. I hate it. Seriously
who on earth thought that the network socket connection API should be
called 'dial'.

Any language allows for people to do mistakes. You can eliminate the
very common mistakes, but they are comparatively easy to spot and fix.
You can't eliminate the very subtle logic problems, which usually linger
a long time in libvirt.

While the language itself may get rid of one layer of compatibility
functions/libraries like gnulib, most of our uses are hidden in utility
functions. Getting rid of it will remove some stuff but we will end up
with a different pile of utility code in a different language. It may be
simpler in the end but it will be there and will be used similarly as we
use the current utility code. There's no clear win in my opinion here.

Then there's the rewrite. While the language may allow calling of C code
and being called from C code we will need to draw a line somewhere.
Adding new Go code into existing C code will be ugly. Rejecting someones
contribution because it's in C is wrong. Also just spending time writing
the same stuff in a supposedly cooler language feels wrong to me. I can
see the value in adding new stuff, but it's a waste to rewrite existing
stuff.

Then there's debugging. Official docs hint to use GDB but in the same
paragraph note that GDB does not work entirely well with Go programs.
[1] There might be other tools like Delve [2] which are still under
heavy development. I'm not entirely persuaded in this area.

I don't like this. Don't expect me to write any Go code.

Peter

[1] https://golang.org/doc/gdb
[2] https://github.com/derekparker/delve

Attachment: signature.asc
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]