Search:
Type: Posts; User: keda
Search:
Search took 0.02 seconds.
-
September 5th, 2010, 12:04 PM
superbonzo
I apologise for my previous post, as I have misunderstood you, at least at two points. Looking at your example again, I see that you've found a way to make a wrapper for Area that is a...
-
September 4th, 2010, 02:20 PM
Well, I didn't specify that there were no side() or radius() functions. I suppose I could have clarified that, but I still find it uncharitable that you go along and turn my example into something...
-
September 4th, 2010, 10:35 AM
Well, I took it to mean not member of the minimal interface. But if the point is that it should not be a member function at all, then I disagree with that point.
Well, I think you should read...
-
September 4th, 2010, 02:22 AM
Well yes, that's part of the garbage that comes with Java, but in addition to that, and probably because they don't care that much that they are using Java in the first place, they don't either care...
-
September 3rd, 2010, 04:19 PM
We were only using Sort and iterators as an example where you are a developer making a library for containers. Its a bit of a red herring to then say that there already exist a library with...
-
September 3rd, 2010, 01:14 PM
template <typename MatTypeOne, typename MatTypeTwo>
void funct(MatTypeOne& m1, MatTypeTwo& m2) {
//different
}
template <typename MatType>
void funct<MatType,MatType>(MatType& m1, MatType&...
-
September 3rd, 2010, 11:58 AM
Just a moment here because I think you might be mixing up two issues, one being ad-hoc polymorphism and the other being parametric polymorphism. The issue superbonzo brought up was of the latter...
-
September 3rd, 2010, 07:20 AM
Well no, I think you might be confusing inheritance with dynamic polymorphism. I'm talking about plain old inheritance:
class X: public Y{...}
X gets all the functions of Y at compiletime.
...
-
September 3rd, 2010, 04:58 AM
I have read some stuff from this Andrei Alexandrescu guy and he seems to be quite innovative at doing stuff with templates. He always seems to have come up with the things I come up with, so it comes...
-
September 3rd, 2010, 04:13 AM
Does anyone happen to have a PHP script that can strip all javascript from HTML leaving the HTML tags, but removing the attributes for scripted events and script tags?
-
September 3rd, 2010, 04:01 AM
If you want to resuse stack space without losing readability, then you could do the following:
void test(){
{
Map *m1 = new Map;
...
}
{
Map *m2 = new...
-
September 3rd, 2010, 03:40 AM
Looking at the article, it seems like he is doing a particular kind of onion design, that I don't directly find see the usefulness of. My first thought was thats upside down. You have the host at the...
-
September 3rd, 2010, 03:02 AM
A a = A(5.0f);
Should do it
edit: Sorry I was reading your post too fast, I don't think you can do that, but you can specify it in another parameter
-
September 3rd, 2010, 02:59 AM
Yes, you could say that I guess. You build up classes from smaller components in a very flexible manner, rather than having to rely on a rigid set of classes.
-
September 3rd, 2010, 02:57 AM
Plain inheritance does the same thing.
-
September 2nd, 2010, 04:12 PM
Well fine, don't use it then. I think this got way sidetracked from the original point anyway.
-
September 2nd, 2010, 12:05 PM
mPhone, is not the input of the algorithm. The input is the base class, which is abstracted from.
Yes, you are absolutely right, I overlooked that possibility, focusing on Herb's approach ignoring...
-
September 2nd, 2010, 07:38 AM
Not sure where you get that impression. How is my algorithm "binding" to the objects they act upon? What do you mean by "binding"?
Yes. Consider an algorithm sort, which we want to use for...
-
September 2nd, 2010, 04:19 AM
Merge sort is a divide and conquer strategy. You subdivide the list into small lists, typically so small that insertion sort is faster on them, then you merge them two and two, having a pointer on...
-
September 2nd, 2010, 03:56 AM
No, the function wasn't made a template, the class was. Therein lies the difference, and I think you might have misunderstood what is meant with partially generic. Partial genericity allows multiple...
-
September 1st, 2010, 04:24 PM
Yes, however that's not really what I'm talking about. While you do not lose anythign performance-wise, you do lose opportunities of extension which is the argument behind thte claim that it...
-
September 1st, 2010, 04:49 AM
Some people like to write
klass *object[32];
rather than
klass* object[32];
because it makes more sense when you declare several:
klass *object[32], *object2[32];
btw isn't class a reserved...
-
September 1st, 2010, 03:31 AM
Thanks, that's informative.
-
September 1st, 2010, 03:10 AM
Well, apparently the problem seems to be here:
template <typename A,typename B,typename C>
struct D{
//inline D& operator=(const D<A,B,C>& p){cout << "blah"<<endl;return *this;}...
-
August 31st, 2010, 10:43 AM
Yes, its just that while he identifies the problem correctly he provides the wrong solution (and looking at those links apparently a lot of people seems to be doing this). Don't strip out members....
|
Click Here to Expand Forum to Full Width
|