Perl Vs Python
Bo M. Maryniuck
b.maryniuk at forbis.lt
Thu Feb 27 14:03:40 EST 2003
On Thursday 27 February 2003 14:35, Derek Thomson wrote:
> I read other's Perl code, and people read mine with no problem.
I read pure i386 Assembler too. So what?
> Rubbish. I suspect you're just parroting something you've read somewhere.
Are you are troll (tongue)? Perl OO is strange if you came from C++ or Java or
Python world. Question: what diferent between Perl 6 and Perl 5?
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
http://technetcast.ddj.com/tnc_program.html?program_id=52
If by "object oriented" you mean force people to only do object-orientation,
then no, Perl is not object-oriented. But if you think object-oriented stuff
is cool in its place, then definitely Perl is "object-oriented". When Perl 5
came out, I basically sat down and said this is my first chance and my last
chance to do it over right. So what are all the buzzwords I want to be
compliant with? The sub-buzzwords under "object-oriented" were very important
to me.
-- Larry Wall
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> For a start, compilation != encryption.
Trolling again? Who talking about encryption? I just want to provide a
bytecode, nothing more.
> you have to accept that the only way to prevent the user "stealing" your
> IP is through contracts and licenses.
*Teoretically* yes. Can you elaborate your _practical_ experience here? It
would be nice (since you like a FACTS).
> Secondly, you *can* do this for Perl. You use the B::Bytecode backend
> plugin to generate byte code for any given sample of Perl code. You can
> also "freeze" the Perl process after it's finished compiling your
> source, and ship that executable.
Cool. Thank you. Probably I missed it since I write much more in Python and
porting the rest from the Perl to the Python. (-:
> I could construct obfuscated examples in Python if I so desired.
But even here it is much more readable (if you know LISP), than Perl's one:
print (lambda Ru,Ro,Iu,Io,IM,Sx,Sy:reduce(lambda x,y:x+y,map(lambda y,
Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,Sy=Sy,L=lambda yc,Iu=Iu,Io=Io,Ru=Ru,Ro=Ro,i=IM,
Sx=Sx,Sy=Sy:reduce(lambda x,y:x+y,map(lambda x,xc=Ru,yc=yc,Ru=Ru,Ro=Ro,
i=i,Sx=Sx,F=lambda xc,yc,x,y,k,f=lambda xc,yc,x,y,k,f:(k<=0)or(x*x+y*y
>=4.0) or 1+f(xc,yc,x*x-y*y+xc,2.0*x*y+yc,k-1,f):f(xc,yc,x,y,k,f):chr(
64+F(Ru+x*(Ro-Ru)/Sx,yc,0,0,i)),range(Sx))):L(Iu+y*(Io-Iu)/Sy),range(Sy
))))(-2.1, 0.7, -1.2, 1.2, 30, 80, 24)
> As for the 100 line limit, I have no such problem, and I've never met
> any capable programmer who did. I use it for "big applications", and
> there are many examples of such things, so your argument is provably
> incorrect.
Well, you *can* write anything in Perl, sure. Probably I explain incorrectly
what I meant. We had write lots of really big software (like Internet Banking
with card authentication etc) in Perl. But I would not like to repeat it
again. Just to quickly understand a code what it means, you should spent much
more time. If you like flamebait, like "$foo vs. $bar" then you'll always
answer "Rules $your_favorite, suxx $all_else", but then I pass. If you like
"Everything is cool", then I think you can write your "very-cool-big-project"
even on Bourne Shell so flag in your hands.
--
Regards, Bogdan
WARN_(accel)("msg null; should hang here to be win compatible\n");
-- WINE source code
More information about the Python-list
mailing list