libXO-ification - Why - and is it a symptom of deeper issues?

NGie Cooper yaneurabeya at gmail.com
Sun Nov 15 18:26:18 UTC 2015


> On Nov 15, 2015, at 10:14, Allan Jude <allanjude at freebsd.org> wrote:

…

> You can setup an atexit() call to call xo_finish automatically when the
> program exits. The original changes to uptime had a few other issues,
> which I fixed.

Programmers are lazy. Telling someone “you need to setup an atexit handler that calls xo_finish” will be met with teeth gnashing and complaints (I’ve had to deal with a bunch of people who complain that FreeBSD is not Linux at $work; I don’t have any interest in fighting developers over stuff like this).

> Yes, but, a typo in any change is likely to cause a problem. This is not
> a problem unique to libxo.

Yes, but there’s a big difference between a typo in !libxo with the meta language, and a typo in libxo. Typo in !libxo: typos visible, unless it was something silly like mis-spelling \n (which doesn’t seem to happen much); typo in libxo: xo_emit call is invalid (no output)/segfaults.

Fortunately libxo seems to support __printflike :).

Thanks,
-NGie


More information about the freebsd-current mailing list