Grokbase
x

Steffen Mueller (nj88...@sneakemail.com)

Profile | Posts (2)

User Information

Display Name:Steffen Mueller
Partial Email Address:nj88...@sneakemail.com
Posts:
2 total
2 in Perl 5 Porters

5 Most Recent

1) Steffen Mueller Re: Possible foreach loop modification?
| +1 vote
Hi John, I think it shouldn't be that hard to do (just guessing), but I don't really see the use...
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi John,

John W. Krahn wrote:
> I was thinking about a possible modification for a foreach loop.
>
> Normally in a foreach loop the list or array is aliased to the scalar
> variable after the 'foreach' keyword or to $_ if no variable is
> specified, for example:
[...]
> But suppose that you just wanted to use a foreach loop to count and were
> not intending to use the contents of the aliased scalar variable. Could
> Perl be modified to do this:
>
> foreach undef ( 1 .. 5 ) {
>     # do something five times without alias
>     }
>
> Or:
> my @array = 'a' .. 'd';
> foreach undef ( @array ) {
>     # do something @array times without alias
>     }

I think it shouldn't be that hard to do (just guessing), but I don't
really see the use case. By simply ignoring $_, you get virtually the
same effect. I see two reasons to want this:

a) Performance optimization. Seems like a very small win for adding
additional syntax
b) Propagating $_ from an outer loop. Seems like a really bad use of $_.
The outer loop should be using a named loop variable.

What's your use case?

Cheers,
Steffen
2) Steffen Mueller Re: [PATCH] Add ENTER_with_name and LEAVE_with_name to automaticlycheck matching scopes when debugging
| +1 vote
Second thought: But it's scoping we're after, isn't it? ENTER_SCOPE(D?) SCOPE_ENTER?
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Steffen Mueller wrote:
> So what about ENTER_NAMED or NAMED_ENTER if you want to hint at
> "naming"?

Second thought: But it's scoping we're after, isn't it? ENTER_SCOPE(D?)
SCOPE_ENTER?
3) Steffen Mueller Re: [PATCH] Add ENTER_with_name and LEAVE_with_name to automaticly check matching scopes when debugging
| +1 vote
Hi Reini, hi all, I hate getting into bike-shedding discussions (or starting them), but why? If...
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi Reini, hi all,

Reini Urban wrote:
> 2009/11/12 Vincent Pit <perl@profvince.com>:
>>> Add ENTER_with_name and LEAVE_with_name, which work identical to ENTER and
>>> LEAVE, but when LEAVE_with_name is done it is checked that it corresponds
>>> to an ENTER_with_name with the same name.
>> I kinda like the idea, but not the name. Since they're going to be spread
>> all other the core, I'd rather have something sorter and prettier.
>
> ENTER_N and LEAVE_N maybe
>
> _with_name as new public opname is way too long.

I hate getting into bike-shedding discussions (or starting them), but why?

If there is one thing that I abhor about the perl API, it's that
everything is shortened to the extreme so that you only grasp the
meaning if you already know it all. It steepens the beginning of the
learning curve by a sizable factor if not an exponent. So what about
ENTER_NAMED or NAMED_ENTER if you want to hint at "naming"?

At least nowadays, people around here seem to spend *a lot* more time
reading perl's code for debugging than actually typing all-new code.

Cheers,
Steffen

PS:
strLT: Does anyone write this regularly? I bet not. So why isn't it
string_less_than?
Newx: What the hell? It *dropped* the x!
vcmp? Yeah.
dSOMETHING meaning "declare SOMETHING"... similarly a... and p... It's
consistent, yes, but if you're new to perl and just read some core or XS
code, it'll take you a while. Same for the PL prefix.
*PUSH*, *POP* for the stack.
We can't fix these, but can we please try to avoid more obscurity?
4) Steffen Mueller Re: retiring as maint pumpking
| +1 vote
Hi Craig, hi Dave, I can only second this. Thanks and *please* stick around at least enough so we...
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi Craig, hi Dave,

Craig A. Berry wrote:
> On Mon, Nov 16, 2009 at 2:33 PM, Dave Mitchell <davem@iabyn.com> wrote:
>> Just to let everyone know I'm officially retiring as the maint pumpking.
>
> Thanks for all your good work. Do hang around and dive in when
> something comes up that interests you, and do please blow the whistle
> if you see any impending train wrecks that aren't visible to less
> experienced eyes.

I can only second this. Thanks and *please* stick around at least enough
so we can lure you back in with hard problems when you've recuperated :)

Cheers,
Steffen
5) Steffen Mueller Re: [PATCH] Add ENTER_with_name and LEAVE_with_name to automaticlycheck matching scopes when debugging
| +1 vote
Hi Gerard, I like the idea. I have a hard time commenting on the implementation, though, for lack...
Perl 5 Porters
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hi Gerard,

Gerard Goossen wrote:
> Add ENTER_with_name and LEAVE_with_name, which work identical to ENTER and
> LEAVE, but when LEAVE_with_name is done it is checked that it corresponds
> to an ENTER_with_name with the same name.

I like the idea. I have a hard time commenting on the implementation,
though, for lack of clue.

> Also includes fixes of universal.c sv_does and POSIX.xs sigaction where
> LEAVEs where missing.

Could you submit these two unrelated patches as separate commits? I
think the second part can be applied unconditionally.

Cheers,
Steffen

spacer
Profile | Posts (2)
Home > People > Steffen Mueller