In this context, maybe the following code review may be interesting/important as well:
<https://sourceforge.net/p/oorexx/bugs/_discuss/thread/33b6f3d4ad/0dcd/e432/attachment/_code%20review.txt>
attached to <https://sourceforge.net/p/oorexx/bugs/2034/> by Jean Louis Faucher.
Also here the question how to assess these findings, and in case of bugs, which ones and what to fix
in which manner?
@Rick: maybe you could give some insights as to why some NEW class methods do not send the INIT
message? Are these maybe oversights or intentionally coded that way?
---rony
On 03.11.2025 14:48, Rony G. Flatscher wrote:
rexxref.pdf states the following in "4.2.9. Initialization":
4.2.9. Initialization
Any object requiring initialization at creation time must define an INIT
method. If this
method is defined, the class object runs the INIT method after the object
is created. If an
object has more thanĀ one INIT method (for example, it is defined in several
classes), each
INIT method must forward the INIT message up the hierarchy to complete the
object's
initialization.
The Object's NEW class method (and some other classes) adhere to this protocol, but others like
Array's NEW class method does not.
The question is, how to asses this? Is this an error in the implementation of e.g. the Array NEW
class method, that it does not send an INIT message to the newly created array object? And if it
is an error, should all arguments given to the NEW message be forwarded to the INIT method, or
should those argument that the NEW method uses be regarded to be consumed and not forwarded to the
newly created object? In the latter case this would have to be documented as well.
So, what is the take on this?
---rony
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel