Re: my if?

2003-07-02 Thread Abigail
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

RE: my if?

2003-07-02 Thread Pense, Joachim
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

Re: my if?

2003-07-02 Thread Abigail
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

RE: my if?

2003-07-02 Thread Pense, Joachim
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 { |

Re: my if?

2003-07-02 Thread Abigail
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:

RE: my if?

2003-07-02 Thread Pense, Joachim
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

Re: my if?

2003-07-02 Thread Bernie Cosell
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

Re: my if?

2003-07-02 Thread Bernie Cosell
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

Re: my if?

2003-07-02 Thread Abigail
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

Re: my if?

2003-07-02 Thread Abigail
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,

Re: my if?

2003-07-02 Thread A. Pagaltzis
* 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;

RE: my if?

2003-07-02 Thread Pense, Joachim
[ { 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