From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: About String
Date: Sun, 15 Jun 2008 15:48:49 -0400
Date: 2008-06-15T15:48:49-04:00 [thread overview]
Message-ID: <wcctzfu1ntq.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: 484d0d5c$0$7537$9b4e6d93@newsspool1.arcor-online.net
Georg Bauhaus <rm.dash-bauhaus@futureapps.de> writes:
> Robert A Duff schrieb:
>> Maciej Sobczak <see.my.homepage@gmail.com> writes:
>>
>>> You did not state it explicitly, but I presume that you allow mixing
>>> declarations with executable code ("as in Java and other languages")?
>> Yes, if I ran the circus, I would allow that. I really find it
>> annoying
>> that I have to add 3 useless lines of code (declare/begin/end) and an
>> extra level of indentation, when all I wanted to do was declare
>> a very-local object.
>
> I find it annoying when I have to search other people's
> procedures for variables. A typical sequence of statements is
> sprinkled with declarations (Java, C, Perl, ...) and no oher
> indication of the newly introduced variables other than
> two identifiers before "=" or ";".
I suppose it's a matter of taste, at least in part.
But the situation in C-style languages is different -- declarations
don't stand out very well. In Ada, the declaration syntax is clear
enough without adding "declare/begin/end".
Besides, even with "declare/begin/end", you still have to search all
over the place to find declarations -- they can be in various packages,
and in any outer block, procedure, etc.
> As Dmitry says, there is an *implicit* scope only.
> When I'm up the wall I speculate whether this viewpoint on language
> use is driven by a desire to achieve income by obfuscation?
> The tempting quick hack?
Not at all. IMHO, "declare/begin/end" obfuscates, by pretending that
the stuff between declare and begin is just declarations, no executable
code.
> To me, ad hoc variables between statements and Java classes fully
> named in source but without "import" at the head of the source file
> are similar in character.
They seem completely different, to me. I agree with you that importing
without saying so up front is not good.
> The good news is: computers can help us with getting the
> necessary "paper work" (declare block etc.) done; use a
> good editor.
Sure, I do use a good editor. That's not the point -- I'm not
complaining about how much work it is to type in "declare/begin/end" --
I'm complaining about how much work it is to _read_ that extra clutter.
The blocks of code we're talking about are often just 2 or 3 lines
of code, so adding several nested declare blocks can easily double
the size of the procedure.
- Bob
next prev parent reply other threads:[~2008-06-15 19:48 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 17:29 About String Sébastien Morand
2008-06-07 16:18 ` Simon Wright
2008-06-07 17:01 ` Pascal Obry
2008-06-07 22:13 ` Chris Moore
2008-06-08 6:47 ` Niklas Holsti
2008-06-08 7:35 ` Dmitry A. Kazakov
2008-06-08 10:29 ` Sebastien Morand
2008-06-08 10:53 ` Dmitry A. Kazakov
2008-06-08 11:14 ` Niklas Holsti
2008-06-08 13:16 ` Dmitry A. Kazakov
2008-06-08 17:17 ` Niklas Holsti
2008-06-09 7:26 ` Dmitry A. Kazakov
2008-06-08 11:48 ` Martin
2008-06-08 13:17 ` Conditional declarations (was: About String) Dmitry A. Kazakov
2008-06-08 18:26 ` About String Chris Moore
2008-06-08 18:32 ` Robert A Duff
2008-06-08 20:51 ` Maciej Sobczak
2008-06-08 21:19 ` Robert A Duff
2008-06-09 7:14 ` Dmitry A. Kazakov
2008-06-09 9:43 ` Georg Bauhaus
2008-06-09 10:25 ` Dmitry A. Kazakov
2008-06-09 10:42 ` Sébastien Morand
2008-06-09 11:43 ` Georg Bauhaus
2008-06-09 12:03 ` Dmitry A. Kazakov
2008-06-15 19:38 ` Robert A Duff
2008-06-15 20:52 ` Dmitry A. Kazakov
2008-06-15 22:06 ` Robert A Duff
2008-06-16 8:31 ` Dmitry A. Kazakov
2008-06-16 19:17 ` Robert A Duff
2008-06-16 20:30 ` Dmitry A. Kazakov
2008-06-16 22:02 ` Georg Bauhaus
2008-06-16 23:04 ` Robert A Duff
2008-06-09 11:00 ` Georg Bauhaus
2008-06-09 14:27 ` Britt Snodgrass
2008-06-15 19:50 ` Robert A Duff
2008-06-15 19:48 ` Robert A Duff [this message]
2008-06-08 11:13 ` Simon Wright
2008-06-08 19:03 ` Sebastien Morand
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox