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.
  • I'm not sure I realized that either :/

    I did a whole Java project without apparently realizing it.
    • ROTFL! Now I feel better!

      I'm also still struggling with the fact that constructors aren't really methods that just happen to return a new object. In fact they don't return anything at all.

      I believe the site I found that clarified the issue of method inheritance vs. constructor inheritance stated that calling constructors methods was a bit like saying the platypus was just another mammal. But then, when I finally tracked down the statement about the lack of constructor inheritance in O'Reilly's Learning Java (and it eluded me because it is not in the section on inheritance; it's in an earlier section), they basically admitted that constructors are methods with some really serious differences.

      For the record, constructors and methods are different in the Java reflection API. I wrote a little utility awhile back that basically reads a class file and spits out as much of the original code as it can get from the reflection API, providing a class file full of declarations. (All this was an exercise in the reflection API, but more importantly just in writing a complex Java program.) I was profoundly disturbed by the duplicated code I had to output method and constructor declarations, but I found it was impossible to find a way to reuse the code, as it had to be different for both Method and Constructor arguments.

      --
      J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers