The Artima Developer Community
Sponsored Link

Weblogs Forum
Programming with "Duh" Typing

370 replies on 371 pages. Most recent reply: Aug 8, 2007 9:54 AM by James Watson

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 370 replies on 371 pages [ « | 1 ... 12 13 14 15 16 17 18 19 20 ... 371  | » ]
Morgan Conrad

Posts: 307
Nickname: miata71
Registered: Mar, 2006

Re: Programming with "Duh" Typing Posted: Jul 7, 2007 8:43 PM
Reply to this message Reply
Advertisement
> I disagree that this is a stupid and useless warning. In
> fact it *should* be a compile error, and it would be if
> Sun weren't concerned that 1.4 code interoperate with
> generified 1.5 libraries without changes. Consider:
> <pre>
> List foo = new ArrayList();
> foo.add(new Integer(1));
> List<String> oops = foo; //warning, you've just pwnd the
> he type system
> </pre>

Irrelevant, this is NOT what I wrote. There is no way you can add an Integer in my example. It is a stupid and useless warning.

Your example is just plain bad code (which you intended it to be, not a knock on you) for a lot of reasons, and you can't stop bad code.

Flat View: This topic has 370 replies on 371 pages [ « | 12  13  14  15  16  17  18  19  20 | » ]
Topic: Programming with "Duh" Typing Previous Topic   Next Topic Topic: Python 3000 Plea for Help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use