ianka / xjson.tcl

A Tcl library that validates, collects, composes JSON data against supplied schemas and to/from Tcl data.
Other
5 stars 0 forks source link

RFE - Tcl 9 support #2

Open apnadkarni opened 1 year ago

apnadkarni commented 1 year ago

I just started using this package seriously to generate Tcl bindings for the Win32 API. A request I'd like to make (had also made it on the wiki) is to move to TclOO from itcl as it does not currently work with Tcl 9 and I'm doubtful about its long term support and time frame.

Am really liking this package for the purpose I'm using it for. Nicely done!

ianka commented 1 year ago

The problem is that I have never used TclOO. I don't know what has to be changed for that, and whether it would change anything in xjson's API. You have to give me some pointers.

apnadkarni commented 1 year ago

For TclOO, I'd written a tutorial - https://www.magicsplat.com/articles/oo.html - may be that helps though I cannot really say what it takes to port since I'm not that familiar with itcl. If you don't get to it, I might take a stab at converting at some point in the future.

The syntax would change though, I'm not sure it can be kept exactly the same.

ianka commented 1 year ago

xjson uses only the very basic features of itcl. The two class factories define some public and some protected methods and variables. There's not even inheritance used.

apnadkarni commented 1 year ago

I guess the changes would be mostly syntactic then. Still, some non-trivial amount of work involved if you include docs and tests.

ianka commented 1 year ago

I looked into it and TclOO is too barebones to me. You even need an extra package to have class variables and procs and then it stil works exactly the opposite direction than in itcl. And there's no solution for the option processing itcl does automatically.

I understand this is all nice if you want to build an object system on top of it yourself but I don't want to do that. I'm an engineer. I want minimal changes.