Axel Naumann on
Hi,
It's time to resume this blog - on what the ROOT team is up to; what happens at the C++ meetings; and a bit of behind-the-scenes of cling and ROOT.
We have started to develop towards ROOT 7 and its new interfaces. We will have bi-weekly meetings to discuss some of items relevant for our users - we'd love to have you involved as much as possible! If you are curious then please subscribe to the root7-discussion egroup.
Already now, before the first meeting, we have an interesting case: new interfaces should nicely interoperate with the standard library; as such we want them to have members called empty()
and size()
.
On the other hand they are ROOT classes - and you are used to IsEmpty()
and GetSize()
.
And inconsistent interfaces are the worst.
Which of these options do you prefer, and why?
- Offer both
GetSize()
andsize()
, one calling the other. - If a class is called
TWhatever
it hasGetSize()
. Call the classROOT::whatever
to signal that is follows the standard library coding conventions, i.e.size()
. TWhatever::size()
is just fine and not a problem.
I'm leaning towards the second option. Others prefer the first. And you?
Cheers, Axel.
Comments
Submitted by Nicola (not verified) on Thu, 12/03/2015 - 13:01 Permalink
Great news
Hi Axel, these are great news! I always thought that Root would never move from its current design to keep backwards compatibility, and that maybe a brand-new framework would have raised in a decade or so from now when the limitations of the current Root design have become too impairing. So Root 7 is very welcome from my side. About your question, I like the option 2 as you do, and since you are about to break the interface I would go down to the end and rename all the TSomething into ROOT::something. For accessors I would do something like Qt does: if a class has a property called prop, then the getter would be named prop() and the setter setProp(). And obviously no public members at all. I know it's a lot of work and headaches with angry users :)
Good work!
Submitted by Matt Williams (not verified) on Thu, 12/03/2015 - 14:09 Permalink
I think I like option 2 the
I think I like option 2 the best with the personal preference for first capital letters on class names. So `TSomething::GetSize()` would become `ROOT::Something::size()` (rather than `ROOT::something::size()`).
If we're going to be breaking backward compatibility in these small ways (which I think is long overdue) then we may as well do it right.
Submitted by Philip Rodrigues (not verified) on Thu, 01/21/2016 - 22:55 Permalink
I can't get to the root7
I can't get to the root7-discussion mailing list. If I follow the link from https://root.cern.ch/root-7 , I get "permission denied", and if I search for "root" on the e-groups page, nothing appears containing "root 7". Am I missing something?
Submitted by Axel Naumann on Sat, 04/16/2016 - 15:27 Permalink
Re: Mailing list
Thanks for letting us know, Philip - this has been fixed a while back.
Axel.
Submitted by Dmitry (not verified) on Sun, 05/29/2016 - 19:50 Permalink
I get the same problem now,
I get the same problem now, except the link now opens "Error! e-group already deleted by another user"
Submitted by Axel Naumann on Fri, 07/15/2016 - 12:34 Permalink
Re: I get the same problem now
Hi Dmitry!
That's really bad, because I cannot reproduce that. That's after you logging in? The link https://e-groups.cern.ch/e-groups/EgroupsSubscription.do?egroupName=root7-discussion seems to work for everyone else :-( Please send me email so I can add you manually!
Cheers, Axel.
Submitted by Ryan Ward Kelley (not verified) on Sun, 02/21/2016 - 02:06 Permalink
I agree with option 2 -- make it look like std c++
I think option 2 is the best. If we break intentionally the interface, we might as well make it look as much like standard C++ as possible.
Submitted by Berserker (not verified) on Sun, 07/03/2016 - 20:03 Permalink
I vote for 2
I vote for 2