Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.ai.fuzzy    |    Fuzzy logic... all warm and fuzzy-like    |    1,275 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 597 of 1,275    |
|    Dmitry A. Kazakov to Maxim S. Shatskih    |
|    Re: Fuzzy Logic Operating Systems    |
|    21 Feb 06 09:57:03    |
   
   XPost: alt.os.development   
   From: mailbox@dmitry-kazakov.de   
      
   On Mon, 20 Feb 2006 21:07:02 +0300, Maxim S. Shatskih wrote:   
      
   >> void Foo::Baz ()   
   >> {   
   >> Bar (); // This dispatches, but it shouldn't,   
   >> // because dispatch already happened to come to Baz   
   >> }   
   >   
   > But this allows a lot of good stuff!   
      
   No it is a contract violation. If Bar should dispatch from Baz, that would   
   mean Baz not defined on Foo. It would be defined on the class rooted in   
   Foo. Being defined on the class, rather than on a specific type, it   
   obviously cannot be overridden. C++ does not capture this distinction.   
      
   >>> Why? The C++ axiom of "only the structure types are objects" is very easy   
   >>> to comprehend and follow, it is not complex.   
   >>   
   >> Yep, Orwellian "all animals are equal, but some animals are more equal than   
   >> others."   
   >   
   > Why is this bad in real-world practice? Can you show the practical case where   
   > it is bad?   
      
   For comp.ai.fuzzy, a relevant example would be Truth_Value derived from   
   both Boolean and some fixed-point numeric type. From that type one would   
   like to derive a lot of specific types with various implementations of   
   s/t-norms. This class of types will be used in container types, which would   
   represent various models of fuzzy sets. Which in turn would form a class.   
   This would allow an implementation of some, say, control algorithm   
   *independent* on the concrete model of uncertainty. This is how it works in   
   mathematics, why should it be otherwise in programming?   
      
   [ OO largely is about generic programming = programming in terms of sets of   
   types. When scalar objects don't generate classes, then generic programming   
   is impossible, because it is the class here to represent a types set. This   
   is why people turn to templates and other macro and preprocessing tools,   
   which are sort of generic programming for poor.]   
      
   >> In practice it means a manual implementation of cascaded dispatch, with a   
   >> good chance to have some combinations undefined, wrong or self-recursive.   
   >   
   > What languages can define this in the language itself? What is the syntax?   
      
   I know no language which does multiple-dispatch right (=fulfills some   
   requirements I hold for important.) But this is a technical issue.   
      
   --   
   Regards,   
   Dmitry A. Kazakov   
   http://www.dmitry-kazakov.de   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca