The Artima Developer Community
Sponsored Link

Weblogs Forum
Generics

46 replies on 4 pages. Most recent reply: Jun 30, 2005 4:24 PM by Bruce Eckel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 46 replies on 4 pages [ « | 1 2 3 4 | » ]
Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Jul 12, 2005 6:27 AM
Reply to this message Reply
Advertisement
> I think it's also important to realize that reflection
> provides a different kind of genericity, and I think it
> may at least partially compensate for the limitations of
> erasure-based generics. Of course, it's more complex to
> use, but at least its possible.

Perhaps we should consider creating another axis for type systems: strongly generic vs. weakly generic. :)

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 5, 2005 4:07 PM
Reply to this message Reply
> See Richard Gabriel's comment at the bottom of
> ParcPlace Type-Safety Discussion
> http://wiki.cs.uiuc.edu/VisualWorks/ParcPlace+Type-Safety+Discussion

Although I agree with the intent of this article, I think it does more harm than good because it has numerous factual errors. Allen Wirfs-Brock clearly has virtually no understanding of C++, based on his examples. (One glaring error is that C++ has covariant return types, which a small amount of research on his part would have revealed.) That, and the fact that he ends by saying "there is only one real choice - Smalltalk" shows that he is more interested in flogging Smalltalk than doing the necessary research to write an accurate article.

I'm a big fan of dynamic languages, of course, but not of arguments made in ignorance.

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 5, 2005 4:28 PM
Reply to this message Reply
> > See Richard Gabriel's comment at the bottom of
> > ParcPlace Type-Safety Discussion
> >
> http://wiki.cs.uiuc.edu/VisualWorks/ParcPlace+Type-Safety+D
> iscussion
>
> Although I agree with the intent of this article, I think
> it does more harm than good because it has numerous
> factual errors. Allen Wirfs-Brock clearly has virtually no
> understanding of C++, based on his examples. (One glaring
> error is that C++ has covariant return types, which
> a small amount of research on his part would have
> revealed.) That, and the fact that he ends by saying
> "there is only one real choice - Smalltalk" shows that he
> is more interested in flogging Smalltalk than doing the
> necessary research to write an accurate article.
>
> I'm a big fan of dynamic languages, of course, but not of
> arguments made in ignorance.


I'd want to know when it was written. Covariant return types are relatively recent. And then there's the issue of compliance. MSVC++ has only had them for what? Three years?

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 5, 2005 8:29 PM
Reply to this message Reply
C++ has had covariant return types since 1997 (they were voted in much before that). I'm not sure what "recent" means in the world of programming, but that's 8 years ago.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 5, 2005 9:50 PM
Reply to this message Reply
We could always search for Richard Gabriels resume and find him at ParcPlace-Digitalk between Dec 1993 and Oct 1996.

iirc Allen Wirs-Brock left ParcPlace-Digitalk in '97

Perhaps we should all refrain from insults made in ignorance.

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 6, 2005 11:59 AM
Reply to this message Reply
Isaac:

Even if C++ had no covariant return types, Wirfs-Brock's understanding of the language as expressed in his examples was still extremely flawed. He was not equipped to make the analysis he tried to undertake -- his arguments were made in ignorance, which I don't consider an insult but a fact. I've certainly made arguments in ignorance myself. It's too bad when it happens, but in this business it seems inevitable, and the best thing I can do is try again when my understanding improves.

That said, it's too bad that there was no date on the article, or that you didn't include the above context when you posted the URL. The way it was posted, it came across as something timely.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 6, 2005 8:01 PM
Reply to this message Reply
I've certainly made arguments in ignorance myself
- do you remember the detail of '94-'96 C++ implementations?
- how do you know what Wirfs-Brock was equipped to do?

The way it was posted, it came across as something timely
The reasonable conclusion to take from an undated article is that you don't know when it was written.

you didn't include the above context when you posted
The above context wasn't relevant. (The URL was posted in reply to a Smalltalk enthusiast, because it spoke of type safety in the context of Smalltalk.)

I'm sorry that you chose to beat-up on someone who isn't here to answer you.
(I should write your mom.)

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 6, 2005 8:21 PM
Reply to this message Reply
> - do you remember the detail of '94-'96 C++
> implementations?

I was on the C++ standards committee and followed the implementations quite closely, and had written fairly extensively about C++ at the time. C++ was pretty much all I did then. Despite the amount of time I spend with Java now, I still think that I have a pretty good grasp of the language.

I also double-checked with someone who continues to monitor C++ more closely than I have been, (my coathor for Thinking in C++ volume 2) before responding to your posting of the Wirfs-Brock URL.

> - how do you know what Wirfs-Brock was equipped to do?

Because I read his article. Regardless of the issues around the timing of covariant return types, he did not understand fundamental language issues in C++, the same issues he was using to attack that language.

> I'm sorry that you chose to beat-up on someone who isn't
> here to answer you.
> (I should write your mom.)

Your comments seem to be consistently aggressive. I don't know if we're dealing with a cultural issue here or something else, but I would prefer that you try to contribute rather than attempt to fight. If you think Wirfs-Brock's article is correct, feel free to show me how -- the Artima forum is intended to be an intellectual discourse, not a fray.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 7, 2005 12:20 PM
Reply to this message Reply
> > - how do you know what Wirfs-Brock was equipped to do?
>
> Because I read his article. Regardless of the issues
> around the timing of covariant return types, he did not
> understand fundamental language issues in C++, the same
> issues he was using to attack that language.

afaict the only support you've provided for a sweeping personal criticism "Allen Wirfs-Brock clearly has virtually no understanding of C++" is that his comments on covariant return types are not true of current C++ implementations.

And now it seems that his comments on covariant return types may have been true when he wrote them - do you agree?


-snip-
> Your comments seem to be consistently aggressive. I don't
> know if we're dealing with a cultural issue here or
> something else, but I would prefer that you try to
> contribute rather than attempt to fight. If you think
> Wirfs-Brock's article is correct, feel free to show me how
> -- the Artima forum is intended to be an intellectual
> discourse, not a fray.

In intellectual discourse the burden of proof rests upon the person making the claim.

It isn't for me to disprove your personal criticism of Wirfs-Brock - it is for you to prove.

(Of course, we promote intellectual discourse by attacking the argument and not the person - we can try to show there's something wrong with Wirfs-Brocks statements without attacking the man.)

Ravi Venkataraman

Posts: 80
Nickname: raviv
Registered: Sep, 2004

Re: Generics "Considered Harmful" Posted: Aug 7, 2005 7:56 PM
Reply to this message Reply
Isaac said, " In intellectual discourse the burden of proof rests upon the person making the claim. "

Bruce, could you please substantiate your arguments about Wirfs-Brock's understanding of C++?

Ravi

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 8, 2005 12:30 PM
Reply to this message Reply
Isaac:

> It isn't for me to disprove your personal criticism of
> Wirfs-Brock - it is for you to prove.

I might argue that you provided the reference to this article, at least implying that it was reliable, and so it seems that some of the burden might be on you to support your claim.

But to address your question, a second (and perhaps more glaring) flaw in the article is that in the "clone" example the return is by value. It was clear by then that this was a hand-waving example, and not one that had ever been near a C++ compiler, but if you need more, you can observe that in a further snippet a keyword was used as a variable name.

When I start delving into problems like this, I come up with compiling and running examples. Through the process of developing these, I discover much more about the problem I'm analyzing. It seems to me that this article decided what its conclusion would be, and then created examples based on hearsay rather than actually compiling them and analyzing the results.

> (Of course, we promote intellectual discourse by attacking
> the argument and not the person - we can try to show
> there's something wrong with Wirfs-Brocks statements
> without attacking the man.)

Point taken. Re-reading my comment, I can see that it did come across as an attack on him, which was inappropriate.

However, perhaps you can give an example of how to say that the article is full of errors without at least broaching the subject that the author of the article does not understand C++ at the same time that he is pretending to analyze and dismiss the language. I admit that it pushes my buttons when someone does this kind of pseudo-analysis and so perhaps I do come across strongly. But at some point I think it is safe to say that the author, at the time he wrote the article, had only a passing familiarity with C++, and to dismiss the article as unreliable.

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 8, 2005 2:24 PM
Reply to this message Reply
> However, perhaps you can give an example of how to say
> that the article is full of errors without at least
> broaching the subject that the author of the article does
> not understand C++ at the same time that he is pretending
> to analyze and dismiss the language. I admit that it
> pushes my buttons when someone does this kind of
> pseudo-analysis and so perhaps I do come across strongly.
> But at some point I think it is safe to say that the
> author, at the time he wrote the article, had only a
> passing familiarity with C++, and to dismiss the article
> as unreliable.

To me, that would be fine if he was making a case about C++. He's wasn't. He was making a case about dynamic typing vs. static typing and using C++ as an example. His knowledge of C++ doesn't really have bearing on that argument, but even if it did I find what he says acceptably accurate for the case he's making. Hell, he pretty much tells us when the article was written but I missed it, and from the back and forth above, I wasn't the only one (he mentions that covariant return types are under consideration in the C++ community).

It's unfortunate that he pressed buttons, but no, I think it is a neatly presented case about dynamic and static typing. He obviously knows enough about type theory. He anticipated the covariant/invariant/contravariant crud that people are agonizing over right now in Java and C#. I take the article for what it is. It wasn't about C++.

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 8, 2005 2:26 PM
Reply to this message Reply
> I take the article for what it is. It wasn't about C++.

Geesh! What am I saying? It wasn't even an article, it was a wiki entry.

Bruce Eckel

Posts: 874
Nickname: beckel
Registered: Jun, 2003

Re: Generics "Considered Harmful" Posted: Aug 8, 2005 2:43 PM
Reply to this message Reply
> I take the article for what it is. It wasn't about C++.

From the "article":

"Myth #5: C++ is a statically typed object-oriented language."

Michael Feathers

Posts: 448
Nickname: mfeathers
Registered: Jul, 2003

Re: Generics "Considered Harmful" Posted: Aug 8, 2005 2:52 PM
Reply to this message Reply
Bruce, what did you like about the wiki entry or was it a complete loss for you?

Flat View: This topic has 46 replies on 4 pages [ « | 1  2  3  4 | » ]
Topic: The Tortoise and the Hare Previous Topic   Next Topic Topic: Open Source Licenses versus Public Domain


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us