dynamic-dispatch Questions
2
I am hoping to find a hint (preferably by good example) for implementing dynamic dispatch in C.
I am learning C and as practice, I want to translate from Java to C using dynamic dispatch virtual m...
Rishi asked 31/3, 2013 at 19:29
4
Solved
Programs written in, for example, Java rely a lot on dynamic dispatch.
How are such programs expressed in functional languages such as Haskell?
In other words, what is the Haskell way of expressi...
Breannabreanne asked 28/10, 2012 at 5:44
4
I come from Ruby, and have sort of adopted the methodology of single responsibility principle, encapsulation, loose coupling, small testable methods, etc., so my code tends to jump from method to m...
Mason asked 20/8, 2012 at 1:8
2
Solved
Is there some way of using magic methods in Java like there is in PHP with __call?
For instance:
class foo {
@Setter @Getter
int id;
@Getter
Map <String, ClassInFoo> myMap;
protecte...
Farinose asked 19/2, 2012 at 14:45
2
Solved
Suppose I have some generic function
genericFunc :: a -> b
genericFunc x = doSomeHardWork
But for a particular type, there is a much more efficient way that genericFunc could be done.
generi...
Adventitia asked 11/12, 2011 at 20:57
1
Solved
Is the Visitor Pattern the fastest way to accomplish method parameter type identification (effectively single dispatch on a parameter, not a member's class) in C++? I might know the exact method(s)...
Diamonddiamondback asked 31/8, 2010 at 17:21
10
Solved
(This question should probably be answered with a reference to Stroustrup.)
It seems extremely useful to be able to request a pointer to the most derived class, as in the following:
class Base { ...
Limber asked 16/6, 2010 at 14:15
3
Solved
This is heavily simplified for the sake of the question. Say I have a hierarchy:
struct Base {
virtual int precision() const = 0;
};
template<int Precision>
struct Derived : public Base {
...
Levesque asked 12/3, 2010 at 21:54
2
Solved
I am using a class Foo that provides these methods:
String overloadedMethod(Object)
String overloadedMethod(Goo)
Since Java statically dispatches on the non-receiver argument, I cannot just pass...
Hydrophilous asked 16/12, 2008 at 9:41
© 2022 - 2024 — McMap. All rights reserved.