octave-patch-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #8417] Consolidate large conditional type


From: David Spies
Subject: [Octave-patch-tracker] [patch #8417] Consolidate large conditional type decisions
Date: Fri, 25 Apr 2014 20:26:04 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0

Follow-up Comment #3, patch #8417 (project octave):

Oh, also I don't think "find" should be added to octave_value_class.  This is
a typical pattern that will necessarily persist for every function in Octave:
find out actual type of object; pass it off to proper template instantiation
of the actual function.

Unfortunately, C++ makes this hideously difficult to do cleanly (as with
anything involving C++ templates.  I suppose you could also use macros... but
then you'd have to use macros).  Adding all the functions to some giant
monolithic class doesn't really help the problem because you still have to
write a separate function-call for each type for each function.

The only way I could see to avoid that is using a template template function
(by the way, don't take me as the sort of person who tries to solve everything
with template templates.  This is the first time I've ever had to use one, and
I hope the last).


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8417>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]