Duh v D'oh

Dagfinn Ilmari Mannsåker ilmari at ilmari.org
Thu Nov 13 13:48:59 GMT 2008


"Paul Makepeace" <paulm at paulm.com> writes:

> On Mon, Nov 10, 2008 at 10:10 AM, Philippe Bruhat (BooK)
> <philippe.bruhat at free.fr> wrote:
>>
>> On Sat, Nov 08, 2008 at 02:47:51AM +0000, Nigel Rantor wrote:
>> > Eden Cardim wrote:
>> >>
>> >> Yes, that'd be cool and instructive, since I haven't had the time to
>> >> dig in to things like Python and Ruby. I'll confess that my vision of
>> >> Perl practicity might be clouded by the previous C, C++ and Java
>> >> experiences.
>> >
>> > It would be interesting if we had some basis for comparison.
>>
>> There was this project: http://pleac.sourceforge.net/
>>
>> PLEAC - Programming Language Examples Alike Cookbook
>
> A more 'meta' example: Compare and contrast working with the debugger,
>
> stix:~$ perl -de0
> Loading DB routines from perl5db.pl version 1.28
> Editor support available.
> Enter h or `h h' for help, or `man perldebug' for more help.
> main::(-e:1):   0
>   DB<1> $a = {foo => 'bar'}
>   DB<2> $a->{foo}
>   DB<3> foreach my $k (keys %$a) {
> Missing right curly or square bracket at (eval
> 20)[/usr/share/perl/5.8/perl5db.pl:628] line 4, at end of line
> syntax error at (eval 20)[/usr/share/perl/5.8/perl5db.pl:628] line 4, at EOF
>   DB<4> foreach my $k (keys %$a) { print $k; }
> foo
>   DB<5> stix:~$

Python's REPL is hardly a debugger, comparing it to something like
Devel::REPL is a bit fairer:

ilmari at fenchurch:~$ re.pl
$ $a = { foo => 'bar' }
$HASH1 = { foo => 'bar' };

$ $a->{foo}
bar
$ foreach my $k (keys %$a) {
> print $k
> }
foo
$ 

-- 
ilmari
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen


More information about the london.pm mailing list