Re: [GSOC 2014]idea:Git Configuration API Improvement
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 20, 2014, 17:36 UTC
- Message-ID
- <xmqqbnx0zsa3.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <vpqd2hh5j7k.fsf@anie.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Why? > > (In general, explaining why you chose something is more important than > explaining what you chose)
Good educational comment. Thanks.
Show 7 quoted lines
> A tree (AST, Abstract syntax tree) can be interesting if you have some > source-to-source transformations to do on the configuration files (i.e. > edit the config files themselves). > > For read-only accesses, I would find it more natural to have a > data-structure that reflects the configuration variables themselves, not > the way they appear in the config file.
... and one important thing that was left unsaid is that the read-only accesses happen far more often than updates, so the data structure must be optimized for the read-only look-up case.