Small language changes

M

Mark Space

Stefan said:
Words in both C and Java are divided into keywords and identifiers.

(Roughly:)
The language defines the meaning of keywords, operators, punctuators,
separators, and so on;
the standard library defines the meaning of standard identifiers;
the programmer defines the meaning of other identifiers.


This is an interesting idea, but I think I must agree with Tom. Some of
those identifiers have meaning which is described in the JLS (and I
don't mean the examples or expanded discussion). Those identifiers are
part of the language. That they also appear in the API (library) is
merely support of and a requirement by the JLS.

In other words, when you use an identifier defined in both, you use a
language feature. The JLS is the point of origin, not the API. The API
is just following the JLS. The JLS is the root, in this case.
 
W

Wojtek

Lew wrote :
I get warnings about failing to use '@Override' for interface methods
in both Eclipse and NetBeans.

'@Override' already exists to show that interface methods are
overridden, so having another annotation to do the exact same thing
would be redundant.

Not here. I am using Eclipse 3.4. It allows @Override for
implemenation, but it is not required.
 
L

Lew

I get warnings about failing to use '@Override' for interface methods
in both Eclipse and NetBeans.
'@Override' already exists to show that interface methods are
overridden, so having another annotation to do the exact same thing
would be redundant.
[/QUOTE]
Not here. I am using Eclipse 3.4. It allows @Override for
implemenation, but it is not required.

'@SuppressWarnings' isn't required, either. Neither is
'@Deprecated'.

Even were it to be provided, I'd lay odds that '@Implements' would
never be mandatory. I also assess that it's a bad idea that it be
mandatory. What would make sense is that javac issue a warning for
the lack of '@Override', since the meaning is identical and the only
problem is enforcement.
 
W

Wojtek

Lew wrote :
Not here. I am using Eclipse 3.4. It allows @Override for
implemenation, but it is not required.

'@SuppressWarnings' isn't required, either. Neither is
'@Deprecated'.

Even were it to be provided, I'd lay odds that '@Implements' would
never be mandatory. I also assess that it's a bad idea that it be
mandatory. What would make sense is that javac issue a warning for
the lack of '@Override', since the meaning is identical and the only
problem is enforcement.[/QUOTE]

Bad symantics on my part.

Eclipse has a compiler setting where I can choose the error level of
various things like annotations. My @Override is set to warning, which
is what I would set a possible @Implements
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top