[Kde-bindings] PerlQt constructor syntax
Dominique Dumont
domi.dumont at free.fr
Thu May 28 19:26:47 UTC 2009
Le Thursday 28 May 2009 05:08:48 Jonathan Yu, vous avez écrit :
> I'm not sure if it's an entirely good idea for people to expect that
> changing from one version to another will mean that all the parameters
> have the same values as before.
That's not the whole idea.
When changing the first constructor call from Tk->new to Tk2->new, I expect
the developer to estimate the impact and test the results.
If the Tk to Tk2 migration means that 90 % of the calls have not changed, this
means that only 10 % of the call needs to be reviewed. And I expect these
changes to be concentrated on some widget, not scattered on all.
In you proposal, 100% of the calls need to be changed.
And don't forget that keeping compatibility is much easier in Perl than in C
or C++.
> Sure, in the simple case, what you are proposing is convenient.
> However, I'm not sure this will work in practice if there are
> parameters involved that change from version to version.
In all cases, major changes means that the code will need to be reviewed and
adapted. I'm just looking to minimize the work and leave alone module that
would not need changes.
> Perhaps what we could do in that case to ease a transition is to
> provide a script which will automatically upgrade your existing
> script, by going through it using PPI and changing the necessary
> calls, so we can rearrange things based on feature changes. The final
> thing would need to be checked over, but I think it's much better that
> way.
Yes, that's a possibility, but all code would need to be changed and re-
delivered. And you would need to support all the developers that would use
such script for the migration. Think 10 years from now and assume as many Qt
modules as they are Tk modules now.
Hope this helps
More information about the Kde-bindings
mailing list