On Tue, Jul 01, 2003 at 02:37:16PM -0400, Bernie Cosell wrote:
Give you anything isn't really the point -- Perl is filled with
multiple ways to do things and the simple argument that you can do
something similar using some other mechanism is rarely determinative.
I can't think of a single
Abigail Wrote
On Tue, Jul 01, 2003 at 02:37:16PM -0400, Bernie Cosell wrote:
Virtually EVERY programmer knows what a simple static
variable is -- and
I doubt that. A lot of programming languages don't know the concept
of static variables. And even in languages that do, it isn't used
On Wed, Jul 02, 2003 at 07:58:03AM +0100, Pense, Joachim wrote:
Even if you are right and not virtually every programmer knows of the
concept, in my view it is a concept that anyone who started using it
probably will not like to miss in the future (well, at least it used to be
my favorite
Abigail wrote
On Wed, Jul 02, 2003 at 07:58:03AM +0100, Pense, Joachim wrote:
that is often recommended in the Perl community. I think it
is easy to see
which version looks elegant and which one kludgy:
(Quoted from earlier in the thread, reformatted:)
| sub x {
|
On Wed, Jul 02, 2003 at 10:33:01AM +0100, Pense, Joachim wrote:
Abigail wrote
On Wed, Jul 02, 2003 at 07:58:03AM +0100, Pense, Joachim wrote:
that is often recommended in the Perl community. I think it
is easy to see
which version looks elegant and which one kludgy:
Abigail wrote
| sub x {
| static $vbl ;
| ...
|
| {
| my $vbl;
| sub x {
| ...
| }
| }
IMO, not doubt the latter looks far more elegant - as that
enables your
'static' variable to be shared with more
On 2 Jul 2003 at 8:07, Abigail wrote:
On Tue, Jul 01, 2003 at 02:37:16PM -0400, Bernie Cosell wrote:
Give you anything isn't really the point -- Perl is filled with
multiple ways to do things and the simple argument that you can do
something similar using some other mechanism is
On 2 Jul 2003 at 8:07, Abigail wrote:
On Tue, Jul 01, 2003 at 02:37:16PM -0400, Bernie Cosell wrote:
Give you anything isn't really the point -- Perl is filled with
multiple ways to do things and the simple argument that you can do
something similar using some other mechanism is
On Wed, Jul 02, 2003 at 11:09:54AM +0100, Pense, Joachim wrote:
Abigail wrote
| sub x {
| static $vbl ;
| ...
|
| {
| my $vbl;
| sub x {
| ...
| }
| }
IMO, not doubt the latter looks far
On Wed, Jul 02, 2003 at 01:02:12PM +0100, Pense, Joachim wrote:
-Original Message-
From: Abigail [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 02, 2003 1:51 PM
To: Pense, Joachim
Cc: [EMAIL PROTECTED]
Subject: Re: my if?
On Wed, Jul 02, 2003 at 11:09:54AM +0100,
* Pense, Joachim [EMAIL PROTECTED] [2003-07-02 14:15]:
You can write
if ($some_condition) {
do_this;
do_that;
do_something_else;
}
and you can write
do_this if $some_condition;
You need not write
if ($some_condition) {do_this}
You can also write
do {
do_this;
[ { my $staticvar; sub mysub {...} }versus sub mysub {static
$staticvar;} ]
Abigail and others point that the first version is more flexible than the
second one, which is true. Reason: the first construct allows subs to share
the statics. On the other hand, there is a psychological
12 matches
Mail list logo