#170 circularqueue new class method requires size

Reference (110)

The circularqueue new class method requires the initialize size of the queue as a parameter. This is not documented.


  • Mark Miesfeld

    Mark Miesfeld - 2010-03-26

    Hmm, kind of seems like it should have a default size if none is specified. The default would still need to be documented.

    What do you think Rick, is there seem reason why a default size is not appropriate?

  • Rick McGuire

    Rick McGuire - 2010-03-26

    Well, the main point behind a circular queue is that it has a fixed size where it wraps. The problem with having a default size it is would be a very arbitrary number that you really shouldn't depend on ever, so there's no real sense in trying to define a default.

  • oorexxpert

    oorexxpert - 2010-03-26

    My point is merely the documentation. If I code:

    like the document says, it gives me an error. The documentation does not describe any parameters to provide on the new method. If I specify a number as the parameter on the new method, that number is displayed if I code
    q = .circularqueue~new(10);
    say q~size / <--- says 10 /

    If you want, you could provide a default for the new method or not, I don't care. Just fix the document.

  • Mark Miesfeld

    Mark Miesfeld - 2010-03-26

    Committed revision 5748.

  • Mark Miesfeld

    Mark Miesfeld - 2010-12-05

    This item is fixed in the 4.1.0 release.



Cancel  Add attachments

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks