[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redesign listeners using templates (issue 235790043 by address@hidde
From: |
nine . fierce . ballads |
Subject: |
Re: Redesign listeners using templates (issue 235790043 by address@hidden) |
Date: |
Fri, 01 May 2015 01:22:57 +0000 |
On 2015/05/01 00:44:45, dak wrote:
I am not going to put in an explanation for every definition of
equal_p for some
smob class.
OK, that makes sense now.
> invoked as T* t = ly_unsmob<T>(target);
I don't think that warrants a template function of its own. It just
makes
matters murkier without saving a significant amount of typing.
Then we'll differ. Repeating the type three times on a line is twice
more than I like. (With C++11 it could be auto t =
ly_unsmob<T>(target).)
But deferring to your judgment, what is your opinion of
static Engraver *unsmob (SCM eng) {
return dynamic_cast<Engraver *> (Translator::unsmob (eng));
}
and eight similar cases I can find which go about saving a small amount
of typing independently?
https://codereview.appspot.com/235790043/