map/grep is not a real iterator?

I always thought map/grep(and many functions in List::MoreUtils) is the way to functional program in perl5. but a small test tell me it's wrong:

test1: perl -e" do{print if $_ %1000 == 0} for(1..100_000_000);" #run successfully

test2: perl -e" map{print if $_ %1000 ==0} 1..100_000_000" #out of memory


seems map function create a array to accommodate all data from list. As I know, an iterator is just an cursor to traverse a lists which can be infinite or finite. but the present implementation of map sets feed list a limit to a ma…

shortcomings of perl

I’m not surprised seeing this happened. it’s 2013, not 2003. except regex, I can’t see perl has any unique feature can dominate any common programming field. (yes, we have CPAN, but you can’t ask a newbie can adeptly choose parts in it to assemble in a canon. ;) ) With more knowing perl, I can more an more understand perl’s shortcomings.

  1. there is no fledged framework for web, like rails of…

wild thoughts about small core.

new version perl will lose weight. that's what I want to see for long time. but cleanning package size is not an ultimate target to me. cleanning internal code and attract developers to improve bizatine define is.

I've been using perl for years. and I love it, because of its expression, its cpan, and its community. But its weakness is also apparent, its implementation and its history which have to be compatible backward. Every time I am frustrated in some deficiencies of perl, which ambition of improving perl failed by it’s internal makes me more frustrated. In other word, perl h…

Mix Perl and C++/CLI

My first perl blog

write down my thought, experience and life about perl.