Christopher J Bottaro wrote:
>
> On Tuesday 17 December 2002 04:38 am, Paul Johnson wrote:
> > I think Perl actually made me a better C programmer, but it is sometimes
> > frustrating going down to the level of C. Keep your hand in with XS
> > programming :-)
>
> what is XS programming?
perldoc
On Tuesday 17 December 2002 04:38 am, Paul Johnson wrote:
> I think Perl actually made me a better C programmer, but it is sometimes
> frustrating going down to the level of C. Keep your hand in with XS
> programming :-)
what is XS programming?
> Yes. And occassionally even if there isn't. Per
From: Paul Johnson <[EMAIL PROTECTED]>
> On Tue, Dec 17, 2002 at 12:39:41AM -0600, christopher j bottaro wrote:
> > just that memory will stay allocated as long as there is a way to
> > reach it?
>
> Yes. And occassionally even if there isn't. Perl 5 uses reference
> counting, and so you have to
On Tue, Dec 17, 2002 at 12:39:41AM -0600, christopher j bottaro wrote:
> cool beans, thanks. wow, perl is neat, but i fear it will make me a
> bad c programmer...;)
I think Perl actually made me a better C programmer, but it is sometimes
frustrating going down to the level of C. Keep your hand
cool beans, thanks. wow, perl is neat, but i fear it will make me a bad c
programmer...;)
so i guess there is no concept of stack and heap space when dealing with perl?
just that memory will stay allocated as long as there is a way to reach it?
hehe, i can't wait to abuse that fact;)
ch
Christopher J Bottaro wrote:
>
> hmm, something is going off in my head that says this is scary.
Calm down Christopher. :-)
> @array is
> local to the function (lexically scoped as you would say in perl??) and you
> are returning a reference to it.
Yes, that is correct.
> well when the functi
On Monday 16 December 2002 08:50 am, Jenda Krynicky wrote:
> > i know what i really should do is this:
> > sub myfunc(){
> > my @array;
> > if ( some_cond ) {
> > return undef;
> > }
> > else {
> > #populate @array
> > return [ @array ];
> > }
> > }
>
> Well ... I would u
Nyimi Jose wrote:
>
> > From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> >
> > From: christopher j bottaro <[EMAIL PROTECTED]>
> > >
> > > #populate @array
> > > return [ @array ];
> > > }
> > > }
> >
> > Well ... I would use
> >
> > return \@array;
> >
> > it's a bit m
00)
José.
> -Original Message-
> From: Jenda Krynicky [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 16, 2002 3:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: couple questions about refs
>
>
> From: christopher j bottaro <[EMAIL PROTECTED]
Chris,
I'll take a stab at this to see if my understanding of Perl is correct.
Your first subroutine is acceptable under Perl, but it wouldn't be
under C++. The reason is that Perl has automatic reference counting
and garbage collection. Perl counts the number of references there are
to data el
From: christopher j bottaro <[EMAIL PROTECTED]>
> hello again,
> all my c instincts tell me i shouldn't write a function like this: sub
> myfunc() {
> my $aref = [];
> if ( some_cond ) {
> return undef;
> }
> else {
> #populate @{$aref}
> return $aref;
> }
> }
11 matches
Mail list logo