diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-08-01 09:19:52 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-08-20 15:25:28 +1000 |
commit | 5af9d6a919b83e28a37ade2db8090a375a93ba53 (patch) | |
tree | fbfbbc5913481bb3baf4b4098f3d1ef772bd3902 /examples/udp.client | |
parent | d0c75cd790ce8b1eca79489c006dad5d530dc405 (diff) | |
download | jimtcl-5af9d6a919b83e28a37ade2db8090a375a93ba53.zip jimtcl-5af9d6a919b83e28a37ade2db8090a375a93ba53.tar.gz jimtcl-5af9d6a919b83e28a37ade2db8090a375a93ba53.tar.bz2 |
oo: better object construction
Now a default constructor is created, as an alias for defaultconstrutor.
The constructor is passed the arguments to new and by default
this accepts a dictionary that is checked for valid instance variables and sets them.
However the constructor can be replaced by one that takes arbitrary arguments.
Thus we can how have:
a new -optiona -optionb
And the constructor is invoked with arguments '-optiona -optionab'.
This makes object initialisation more flexible.
** Note: This is an incompatible change if you have classes with a constructor
and you create object instances with new <dict>.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Documentation fixes -
Co-authored-by: Adrian Ho <the.gromgit@gmail.com>
Diffstat (limited to 'examples/udp.client')
0 files changed, 0 insertions, 0 deletions