--SNIP--
>'tis better to understand the distinction between lines and statements
>yourself; there are far too many places where a semicolon at the end
[quoted text clipped - 4 lines]
> /* some code */;
>};
Yes, but in that example, first of all, the initial { as I've seen
would be at the end of the first line. Regardless of that, the IDE in
theory could be designed to have exceptions: in this example, don't
put a ; after a {, or a }, or a */ all of these are very obvious
decisions.
I presume you could come up with examples where there is not such an
obvious choice of appropriateness for a ;, but maybe not. I don't
know.
>which is, admittedly, a ludicrous extreme -- but it's not immediately
>obvious why the /* some code */ part always runs exactly once unless
[quoted text clipped - 4 lines]
>some point. It's not VB, it's not *like* VB, and trying to pretend
>that it's VB will not end well.
I'm not trying to get it to be like VB - you misunderstand me. I'm
only aspiring to have an IDE be more intuitive than it is. The things
I like about VB are what they are, and I leave that out of the
discussion. What I DO compare is the capabilities of the IDE software
- which only has a lateral relationship with the language itself. I
have discovered that the Eclipse software has a not-too-shabby version
of 'intellisense' as it is called in Visual Studio. But there are lots
of things that it lacks. I'm not criticizing in an offensive way,
rather just proposing new features that would improve it (or trying to
find out if they already exist and I cannot find them).
I'm no great fan of Micro$oft products, I have a plethora of
complaints about the designs behind most of their products, OSes,
games, etc. However, there are a precious few things that are
extremely impressive to me, and I acknowledge and respect them. One is
DirectX, for its own reasons, another is the Visual Studio IDE. It is
powerful, intuitive, and allows for some vital advantages: faster and
easier development. There are no downsides to that.
Given your example, though, and also that I'll take it for granted
(I'm only deferring to seniority in experience here) that there ARE
times where it would not be appropriate to put a ; at the end of the
line, can you explain what those checkboxes in the options are for
then? It specifically has a section where it has the option to
'automatically put where appropriate' a ;, and {
What exactly do those optional features mean?
>-o
>(Ctrl-enter isn't even any fewer keystrokes, either -- if you can
>train yourself to hit ctrl on only the correct lines, then you can
>train yourself to hit semicolon just as well.)
ENTER is easier for me to hit on my keyboard ;) You're correct that I
must train myself to end a line with ; when appropriate, I agree, and
I'm doing so. However, there's nothing retrogressive about wanting an
IDE to do more for me :)
Thank for the reply, I appreciate your point of view and advice.
Dan
Lew - 13 Dec 2007 17:01 GMT
Owen Jacobson wrote:
>> 'tis better to understand the distinction between lines and statements
>> yourself; there are far too many places where a semicolon at the end
[quoted text clipped - 4 lines]
>> /* some code */;
>> };
> Yes, but in that example, first of all, the initial { as I've seen
> would be at the end of the first line. Regardless of that, the IDE in
Only by convention, and many people prefer to put an opening brace on its own
line. Besides, that has nothing to do with Owen's point.
> theory could be designed to have exceptions: in this example, don't
> put a ; after a {, or a }, or a */ all of these are very obvious
> decisions.
Obvious, but not illegal. You can put semicolons there if you want.
And what's wrong with it after a "*/" comment closer?
> I presume you could come up with examples where there is not such an
> obvious choice of appropriateness for a ;, but maybe not. I don't
> know.
"Appropriateness" is for the human; the compiler has different criteria.
> Given your example, though, and also that I'll take it for granted
> (I'm only deferring to seniority in experience here) that there ARE
[quoted text clipped - 3 lines]
> 'automatically put where appropriate' a ;, and {
> What exactly do those optional features mean?
Personally I find putting an opening brace for a block on its own line to be
appropriate, and I configure the IDE accordingly.
The problem is that the IDE cannot be as smart as you are. It will do things
the way you want *most* of the time, appropriately configured, but you will
never get it to replace your own effort.
>> (Ctrl-enter isn't even any fewer keystrokes, either -- if you can
>> train yourself to hit ctrl on only the correct lines, then you can
[quoted text clipped - 4 lines]
> I'm doing so. However, there's nothing retrogressive about wanting an
> IDE to do more for me :)
You also have to train yourself to type "public" where appropriate, "static"
where appropriate, "class" where appropriate, parentheses where appropriate,
dots where appropriate, "%" symbols where appropriate, ...
It's called "learning the language".

Signature
Lew
Mark Clements - 14 Dec 2007 18:56 GMT
> Owen Jacobson wrote:
>>> 'tis better to understand the distinction between lines and statements
[quoted text clipped - 15 lines]
>> put a ; after a {, or a }, or a */ all of these are very obvious
>> decisions.
You can use a plugin such as PMD to flag when you are breaking a
pre-defined (albeit customizable) set of best-practise rules.
Mark