[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] That was productive...



> I find that to be very unpleasant visually.  Perhaps I've just been
> sufficiently Abigailized, but if I find myself writing C-ish for loops
> to iterate over arrays, I sit back and consider how I might write the
> code in Perl and not in C.  The result is usually much clearer.  I've
> found that the more I play around with functional languages, the less
> I expose array indices in my code.

I agree with the sentiment of "PINCACINP" (Perl is not C, and C is not
Perl).  So I rarely write similarly between the two (well, between Perl
and C++, really... haven't done much C).

It's because Perl's data types are "easier" to use that idioms like

  for (@array) { ... }

are used, whereas in C, you iterate over an array with pointers or
indices.  Sigh.

I like Perl for what some of my friends have called its "macros".  "Perl
is just a macro language for C," they say.  Well, I don't care. :)

-- 

  MIDN 4/C PINYAN, USNR, NROTCURPI     http://www.pobox.com/~japhy/
  jeff pinyan: japhy@pobox.com     perl stuff: japhy+perl@pobox.com
  "The Art of Perl"               http://www.pobox.com/~japhy/book/      
  CPAN ID: PINYAN  http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
  PerlMonth - An Online Perl Magazine     http://www.perlmonth.com/


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe