From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: vc-*-root finctions
Date: Fri, 22 Feb 2008 18:34:33 +0100 [thread overview]
Message-ID: <87skzk3nfa.fsf@ambire.localdomain> (raw)
In-Reply-To: <200802221542.m1MFgSre027158@sallyv1.ics.uci.edu> (Dan Nicolaescu's message of "Fri, 22 Feb 2008 07:42:28 -0800")
() Dan Nicolaescu <dann@ics.uci.edu>
() Fri, 22 Feb 2008 07:42:28 -0800
Because if forces a backend implementor to read two things
instead of one.
Not really. All you need to know to implement is in the
Commentary. The rationale doesn't add any more information,
just design background.
Well, you are effectively introducing two functions, but
squeezing them into one with a very weird interface. Explain
how is that allows for less maintenance.
Look at the overall picture. In the present system, each
backend must decide synchronicity, do scratch buffer and
subprocess maintenance, compute the result, and do a function
call. This can be error prone (vc-svn-dir-status from vc-svn.el
1.71 leaks buffers, e.g). In the proposed system, the backend
need only decide synchronicity and compute its result;
vc-status-refresh does the rest.
True, vc-status-refresh becomes more complex, but the overall
reduction in (redundant) complexity is a win.
How about way too complex?
Just stick w/ the Commentary, then; that explains the interface
requirements. Lots of things are complex in the core so that
the interfaces are simple and regular. This is one of them.
Can you please explain what you mean rather than hand wave?
Given that you are replacing existing working code, it would
be nice if you'd explain what problem you are trying to
solve, and why the approach you took is the right way to
solve the problem (other than applying the NIH principle).
I have tried to explain it but since i don't know where you fail
to understand things, i don't know how to explain it better.
When i fixed the vc-svn.el 1.71 bug, that was when i started to
think about eliminating the possibility of that bug. Perhaps if
you go through the process of fixing that bug, then think along
those lines, you will arrive at similar conclusions.
You are changing code that is simple to something that is
strange and complex. Enquiring minds would like to know the
reasoning behind those changes and to make sure that the
changes you are making are the right way to solve whatever
problem you are trying to solve.
You ask for an explanation. I wrote it in a comment. You say
the comment is too complex. But, the important thing is: it
exists. I can now do other things while you try to understand
it. Good luck!
Occam's razor also applies to functions with terribly
complicated interfaces. So no, the above is not a good
motivation.
What is good and what is not good? Are bugs good? Are systems
that breed bugs good? Are programmers who support systems that
breed bugs good?
And why is it better to not have a separate function?
You repeat your questions, so i repeat my answers. See above.
thi
next prev parent reply other threads:[~2008-02-22 17:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 22:06 vc-*-root finctions Stefan Monnier
2008-02-20 11:12 ` Thien-Thi Nguyen
2008-02-20 17:21 ` Stefan Monnier
2008-02-20 18:21 ` Thien-Thi Nguyen
2008-02-20 18:50 ` Dan Nicolaescu
2008-02-21 15:33 ` Thien-Thi Nguyen
2008-02-21 18:35 ` Dan Nicolaescu
2008-02-21 19:03 ` Tom Tromey
2008-02-21 20:06 ` Dan Nicolaescu
2008-02-21 19:33 ` Stefan Monnier
2008-02-21 19:01 ` Tom Tromey
2008-02-21 20:01 ` Dan Nicolaescu
2008-02-21 19:50 ` Dan Nicolaescu
2008-02-22 14:41 ` Thien-Thi Nguyen
2008-02-22 15:42 ` Dan Nicolaescu
2008-02-22 17:34 ` Thien-Thi Nguyen [this message]
2008-02-22 19:02 ` Dan Nicolaescu
2008-02-22 2:42 ` Mike Mattie
2008-02-20 19:20 ` Stefan Monnier
2008-02-21 15:36 ` Thien-Thi Nguyen
2008-02-21 16:16 ` Stefan Monnier
2008-02-22 14:54 ` Thien-Thi Nguyen
2008-02-22 16:50 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87skzk3nfa.fsf@ambire.localdomain \
--to=ttn@gnuvola.org \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.