Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • That code example should be exhibit A in why I prefer Ruby over Smalltalk. That, and the image-based versus file-based issue. :)
    • Smalltalk syntax is like lisp syntax. It's deliberately small so that it can be parsed easily, and reflexive programming is easy.

      Squeak also includes a more traditional syntax if you choose to use it (most don't), but can still map the one syntax to the other, without even losing comment locations.

      Or, you can program in a tile-like environment in Morphic, which again builds Smalltalk methods from the tiles.

      The nice thing about Smalltalk is that it's a way of life, not a language. And every part of i

      --
      • Randal L. Schwartz
      • Stonehenge
  • This reminds me of something I did once on a long Metro-North ride home from NYC after reading a having read a paper on Smalltalk.

    #!/usr/bin/perl

    use strict;
    use warnings;

    use Test::More tests => 2;

    {
        package Boolean;

        use strict;
        use warnings;

        sub import {
            no strict 'refs';
            *{(caller())[0] . '::cond'} = \&cond;
        }

        sub cond (&) {
            my ($bloc

    --
    -stvn
    • Sweet! I would change two methods:

      sub isFalse {
          my ($self, $sub) = @_;
          ! $self->() && $sub->();
          return $self;
      }

      sub isTrue {
          my ($self, $sub) = @_;
          $self->() && $sub->();
          return $self;
      }

      Maybe I can slip this into production ... (no, I'm not serious.)

  • "Real" OO is Tlön [interglacial.com] -- a nice place to visit but I wouldn't want to think there.