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.
  • And not to be fighting this debate in multiple domains, but just for the record, here's my contribution to P5P:

    Here's what I said on an upcoming SysAdmin column (archived at my site [stonehenge.com], but not available yet per publisher embargo):

        And now, before I run out of space, let me touch on a hot-button for
        me.  The I<perltoot> manpage contains an archetypal C<new> routine
        that looks like:

          sub new {
            my $proto =

    --
    • Randal L. Schwartz
    • Stonehenge
    • There was a similar discussion at one point in a corner of the Smalltalk community, but without the "it should make a copy" camp (since folks in the Smalltalk community were painfully aware of the differences between a deep and a shallow copy). As I recall, the concensus opinion was that it's easy enough to say
        newObject := someObject class new
      which is the equivalent of
        $newObject = (ref $someObject)->new
      The only instance-side new I could find when I went looking through an old VisualWorks image was in an addition (a filein) that was of dubious quality.

      • Actually, I believe the proper idiom in Smalltalk-80 (and thus Squeak) is: newObject := someObject species new because "species" returns "the class that can make something like this". "species" defaults to "class" for most classes, but check to see where it's defined (and thus overriding class): it's quite fascinating.
        --
        • Randal L. Schwartz
        • Stonehenge