[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature tests and %before-header
From: |
Joel E. Denny |
Subject: |
Re: feature tests and %before-header |
Date: |
Mon, 16 Oct 2006 13:26:29 -0400 (EDT) |
On Mon, 16 Oct 2006, Paolo Bonzini wrote:
> %requires and %code-top happen to be equivalent in Java, just like epilogue
> and %provides.
The epilogue and %provides are slightly different in that %provides can
appear in the definitions or grammar section. In other words, the
epilogue is like one big final %provides. Right? This seems ok to me.
%requires and %code-top have no distinction it seems. %requires is the
better name, I think.
Are you allowing %{...%} in Java as a synonym of some of the new
directives?
Unlike C/C++, there are no backward compatibility issues for the Java
skeleton. I wonder if you should take the approach of providing one
"right" way to do things (the new directives) rather than providing so
many synonyms. What do you think? It shouldn't be difficult to disable
%{...%} and %code-top for all but C/C++, I think.
> This was done just in case somebody did the BYacc/J-ish
>
> %{
> package foo.bar;
> %}
I am no Java expert, so correct me if I'm misunderstanding something. In
a Java file, you can have only one package directive, right? A code block
doesn't seem quite appropriate for that to me. What about %name-prefix as
in the C++ skeletons? Or do you already have a purpose for that?
> Thanks for fixing this. Even if all the four directives proved to be
> necessary, I think that the new naming is much better as it is much more
> language independent, and even if Java misses 2.3b (I hope not, I'd rather
> have it in by 2006 in fact), it is better that the %*-header naming did not
> crystallize in a stable release.
I agree. Also, %code and %requires are usually sufficient (even in
C/C++), so it's often possible to ignore %provides and %code-top.
Especially in that situation, the names %code and %requires seem easy to
remember while %after-header and %start-header don't.
- feature tests and %before-header, Joel E. Denny, 2006/10/15
- Re: feature tests and %before-header, Joel E. Denny, 2006/10/16
- Re: feature tests and %before-header, Paolo Bonzini, 2006/10/16
- Re: feature tests and %before-header,
Joel E. Denny <=
- Re: feature tests and %before-header, Paolo Bonzini, 2006/10/16
- Re: feature tests and %before-header, Joel E. Denny, 2006/10/16
- Re: feature tests and %before-header, Paolo Bonzini, 2006/10/17
- Re: feature tests and %before-header, Joel E. Denny, 2006/10/17
- Re: feature tests and %before-header, Joel E. Denny, 2006/10/17
Re: feature tests and %before-header, Joel E. Denny, 2006/10/20