I've been investigating ".NET" and the C# language, and can't help compare things against Perl as well as the usual C++ and Java.

The author of a book I'm reading has a rather narrow world view, basically thinking that Microsoft products and Win32 are the entire history of computing. He makes sweeping statements, but obviously doesn't know other languages like Self, CLOS, Smalltalk, or Perl.

Anyway, one thing he points out is the ability to supply a default initial value for a data member when it is declared, and not have to specify that value as an initializer in every contructor (though it has that effect). He says (implied all) other OO languages can't do that.

Update: add example pseudocode

In pseudo-C++ (I don't want to butcher C# since I don't know it yet), it would be something like this:

class C { int x= 5; int y= 9; public: C() {}; // don't need to state x,y values. C (int xx) : x(xx) {} // y=9 without me saying it again. };
That is, for all constructors, not initializing a value will imply the global initialier's value, without specifying the same value in each constructor.

But, I seem to remember such a thing in one of the Perl object systems. Does anyone know which one that might be?

Second, what ever happened to ActiveState's Perl.NET? I heard lots of hype once upon a time, then reports that it didn't work but they are providing a seemless way to integrate Perl with .NET (which is all I care about the idea anyway). Has anybody used it and reported on it in detail yet?

--John


In reply to OOP, ".NET", Perl, and all that by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.