Thread (218 messages) flat view 218 messages, 9 authors, 2016-11-06

Re: [PATCH 11/22] sequencer: get rid of the subcommand field

From: Johannes Schindelin <hidden>
Date: 2016-09-01 07:55:44

Hi Kuba,

On Wed, 31 Aug 2016, Jakub Narębski wrote:
W dniu 29.08.2016 o 10:05, Johannes Schindelin pisze:
quoted
While at it, ensure that the subcommands return an error code so that
they do not have to die() all over the place (bad practice for library
functions...).
This perhaps should be moved to a separate patch, but I guess
there is a reason behind "while at it".
Yes. It seemed like the logical thing to do: I already introduce a new
function, why should I shlep over a paradigm I do not want in the end?
Also subcommand functions no longer are local to sequencer.c
They never were. All you had to do was to set a field and run the global
function.

The real problem there was that the different local functions needed
different parameters, and the round-about way to set those parameters as
fields in a struct and then call a global function with that struct just
makes it impossible to have compile-time safety.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help