On 06.01.2026 12:12, Rick McGuire wrote:
As currently implemented, no. The initial array is allocated as a single piece of storage, which must be done before the INIT method is called. There are some serious efficiency considerations there as arrays are extensively used in internal operations. Delaying this would require two objects get created for every array vs. the single object that is currently required. Since the majority of arrays that are created never need to be expanded, this would be a pretty severe performance hit.

Thank you very much for this important information!

---rony


On Tue, Jan 6, 2026 at 5:52 AM Rony G. Flatscher <[email protected]> 
wrote:

    It appears that the NEW method of Array initializes (e.g. reserves the 
memory for) an
    array. Would
    it be possible in principle to move initialization to Array's INIT method?
    (This way, a subclass of Array would become able to process (maybe change) 
the arguments in
    its INIT
    method and then do a self~init:super(...).)

    If so, what would be the possible consequences?

    ---rony

    P.S.: Question related to <https://sourceforge.net/p/oorexx/bugs/2034/>.

_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to