Steve Loughran wrote:
1. I dont like all the extra typing you need everywhere; it makes
things more verbose. What is wrong with polymorphic type inference?
I'd like to know the story on type inference for Java too, though it is
probably more a question for the Types mailing list
(http://lists.s
Chavdar Botev wrote:
Peter Reilly wrote:
The original code may be slightly incorrect (my understanding
of java generics is not high).
Ha-ha. I think the original code cannot be slightly incorrect. It is
either correct or incorrect. ;) It certainly possible that my
understanding of Java generics
TWIMC,
I know I am a bit into the gray cross-posting area but here is the
thread I started on the Java Forums:
http://forum.java.sun.com/thread.jspa?threadID=778203.
Chavdar
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For addi
Ha-ha. I think the original code cannot be slightly incorrect. It is
either correct or incorrect. ;) It certainly possible that my
understanding of Java generics is wrong. I come from a C++ templates
background and although syntactically similar, Java generics and C++
templates seem to be very d
Chavdar Botev wrote:
Peter Reilly wrote:
The original code may be slightly incorrect (my understanding
of java generics is not high).
Ha-ha. I think the original code cannot be slightly incorrect. It is
either correct or incorrect. ;) It certainly possible that my
understanding of Java generics
Peter Reilly wrote:
The original code may be slightly incorrect (my understanding
of java generics is not high).
Ha-ha. I think the original code cannot be slightly incorrect. It is
either correct or incorrect. ;) It certainly possible that my
understanding of Java generics is wrong. I come from
And, regarding generics...as for value - wow...how many heterogenous
collections did we ever really use in pre 1.5 code? Most of my
collections always contained homogeneous data. So, having generics now
certainly improves readability (yes I know, under the covers it does the
casts for me)...
Sorry let me clarify... The comment was "The original code may be
slightly incorrect (my understanding
of java generics is not high)." And the response was "Me too. I don't
like STL!" I do realize STL is built using generics.The Standard
Template Library defines templates...but STL in and
Scot P. Floess wrote:
What do generics have to do with STL?
You're joking, right? Have you used the STL much?
Generics are very very handy :)
Maybe. I live in a world where the majority of my code has to work on
pre-Java 5, and for code where I can use Java 5 features, generics don't
seem
What do generics have to do with STL? Generics are very very handy :)
James Abley wrote:
Peter Reilly wrote:
The original code may be slightly incorrect (my understanding
of java generics is not high).
Me too. I don't like STL!
James
Peter:
Point well taken. The problem here, I think, is that the inner class
has access to everything defined in the outer class (this includes the
declaration of the generic). Of course, javac comes in and does some
creative compiling to make that possible. Personally, I strive very
hard t
Peter Reilly wrote:
The original code may be slightly incorrect (my understanding
of java generics is not high).
Me too. I don't like STL!
James
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
The original code may be slightly incorrect (my understanding
of java generics is not high).
Test1.java is defined as:
public class Test1 {
public class Inner1 {
protected T v;
public Inner1(T v) {this.v = v;}
public T getV() {return this.v;}
Actually, I think the real problem isn't generics but an inner class
that using a generic specified by the outer class. I bet this problem
goes away if all the classes were defined as outer classes.
Steve Loughran wrote:
Scot P. Floess wrote:
Steve:
My apologies...my mouth is now stretched
Scot P. Floess wrote:
Steve:
My apologies...my mouth is now stretched from the placement of my foot
in my mouth ;) When I tried this, I didn't specify -classpath to
command line javac. I see now by doing so it does, in fact, break as
mentioned.
Yeah, I agree (now) that it is a bug :)
Or
Steve:
My apologies...my mouth is now stretched from the placement of my foot
in my mouth ;) When I tried this, I didn't specify -classpath to
command line javac. I see now by doing so it does, in fact, break as
mentioned.
Yeah, I agree (now) that it is a bug :)
Scot
Steve Loughran wrote
Scot P. Floess wrote:
How is this a java generics bug? I specifically was able to compile
just Test3.java using command line javac... So its not javac nor is it
a generics problem.
we can replicate it on the command line, just by adding the .class file
to the classpath. That's why its a co
How is this a java generics bug? I specifically was able to compile
just Test3.java using command line javac... So its not javac nor is it
a generics problem.
It is probably needed for incremental builds in which all source files
are not in the source tree you specify, such as when you have
On 10/18/06, Steve Loughran <[EMAIL PROTECTED]> wrote:
Peter Reilly wrote:
> On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote:
>> Peter,
>>
>> I repeated the steps you described and I can confirm that with the
>> -classpath argument the compilation fails and without it the
>> compilation succ
Steve Loughran wrote:
> Peter Reilly wrote:
>> On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote:
>>> Peter,
>>>
>>> I repeated the steps you described and I can confirm that with the
>>> -classpath argument the compilation fails and without it the
>>> compilation succeeds. I also tried running
Peter Reilly wrote:
On 10/17/06, Chavdar Botev <[EMAIL PROTECTED]> wrote:
Peter,
I repeated the steps you described and I can confirm that with the
-classpath argument the compilation fails and without it the
compilation succeeds. I also tried running javac on "src/test/*.java"
instead of "src/
Matt Benson wrote:
--- Peter Reilly <[EMAIL PROTECTED]> wrote:
[SNIP]
I have just checked the revision history,
since the initial checkin (6 years, 9 months),
has always added
the destination path to the classpath for the javac
command.
It does not seem to be necessary? but I do not know
if
w
Cygwin)
> > > > > >>
> > > > > >>> ant -v
> > > > > >> Project base dir set to:
> C:\tmp\ant-generics
> > > > > >> [javac] build.xml skipped - don't
> know how to handle it
> > > > > &
don't know how to
> > > >> handle it
> > > >> [javac] test\Test3.class skipped - don't know how to handle it
> > > >> [javac] test\Test3.java added as test/Test3.class is outdated.
> > > >> [javac] Compiling 1 source file
mitted as test/Test1.class is up to date.
> > >> [javac] test\Test2$Inner2.class skipped - don't know how to
> > >> handle it
> > >> [javac] test\Test2.class skipped - don't know how to handle it
> > >> [javac] test\Test2.java om
lass skipped - don't know how to
> >> handle it
> >> [javac] test\Test3.class skipped - don't know how to handle it
> >> [javac] test\Test3.java added as test/Test3.class is outdated.
> >> [javac] Compiling 1 source file to C:\tmp\ant-generics
ation arguments:
>> [javac] '-d'
>> [javac] 'C:\tmp\ant-generics'
>> [javac] '-classpath'
>> [javac] ' LOT-OF-LIBS-FROM-ANT '
>> [javac] '-sourcepath'
>> [javac] 'C:\tmp\ant-generics
command.
[javac] File to be compiled:
[javac] C:\tmp\ant-generics\test\Test3.java
BUILD SUCCESSFUL
build.xml:
Jan
-Ursprüngliche Nachricht-
Von: Peter Reilly [mailto:[EMAIL PROTECTED] Gesendet:
Dienstag, 17. Oktober 2006 16:44
An: Ant Users List
generics'
[javac] '-g:none'
[javac]
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.
[javac] File to be compiled:
[javac] C:\tmp\ant-generics\test\Test3.java
BUILD SUCCESSFUL
build.xml:
mented line).
This works by itself, but touch Test3.java and run again.
Peter
Jan
>-Ursprüngliche Nachricht-
>Von: Peter Reilly [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 17. Oktober 2006 11:39
>An: Ant Users List
>Betreff: Re: a problem compiling a Ja
piled:
[javac] C:\tmp\ant-generics\test\Test3.java
BUILD SUCCESSFUL
build.xml:
Jan
>-Ursprüngliche Nachricht-
>Von: Peter Reilly [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 17. Oktober 2006 16:44
>An: Ant Users List
>Betreff: Re: a problem compilin
>Von: Peter Reilly [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 17. Oktober 2006 11:39
>An: Ant Users List
>Betreff: Re: a problem compiling a Java 5 project with generics
>
>Can you enter a bugzilla report about this.
>It is very strange.
>
>I tried on the commandl
: Re: a problem compiling a Java 5 project with generics
>
>Can you enter a bugzilla report about this.
>It is very strange.
>
>I tried on the commandline:
>
>javac -target 1.5 -g -source 1.5 -sourcepath src -d
>build\classes src\org\test\Test3.java
>
>which works f
Can you enter a bugzilla report about this.
It is very strange.
I tried on the commandline:
javac -target 1.5 -g -source 1.5 -sourcepath src -d build\classes
src\org\test\Test3.java
which works fine - and looks very like the command used by ant.
Peter
On 10/17/06, Chavdar Botev <[EMAIL PROT
Hi
For some reason, the mailing server included only the first
attachment. Since this is the fourth or the fifth time I am trying to
send the java files, I give up. I'll inline them in the message.
// src/test/Base.java
package test;
public class Base {}
// src/test/Sub.java
package test;
publ
On 17/10/06, Chavdar Botev <[EMAIL PROTECTED]> wrote:
Hi!
I've come accross the following problem trying to compile Java 5
classes with generics using Ant 1.6.5. I've attached project
with sample Java classes and a build.xml file.
NOTE: Please create a src/test subdirectory and save the attach
Hi!
I've come accross the following problem trying to compile Java 5
classes with generics using Ant 1.6.5. I've attached project
with sample Java classes and a build.xml file.
NOTE: Please create a src/test subdirectory and save the attached
.java files into it. The mailing list server gave me
37 matches
Mail list logo