From kde-core-devel Fri Dec 15 15:49:14 2006 From: "Robert Knight" Date: Fri, 15 Dec 2006 15:49:14 +0000 To: kde-core-devel Subject: Re: KRandomSequence's methods constness and naming issues Message-Id: <13ed09c00612150749i5cca2a69s11941d6cc0d1041c () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=116619787218673 > Hmm... next? next to what? :) > How about perhaps generateBool(), generateInt() etc? next as in "next in the sequence of random numbers". This naming scheme is used in other APIs as well, for example: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Random.html In addition you can also see this class as an iterator over an infinite list of numbers. In which case using a naming scheme similar to Qt 4's own Java-style iterators would seem appopriate. Either way, I would understand what was meant by generateInt, generateBool, so that would also be ok. I just prefer to try to use naming that is similar to APIs which people already know. On 15/12/06, Dmitry Suzdalev wrote: > 2006/12/15, Robert Knight : > > Since these are values from a sequence, perhaps nextTypeName() would be > > best. > > > > eg. nextBool() , nextInt(). > Hmm... next? next to what? :) > How about perhaps generateBool(), generateInt() etc? > > > > Can this change somehow break compilation of other modules? > > > > I don't think so. I think it will change the method signatures ( and > > therefore break the ABI ), so a recompile will be needed - but if you > > are doing this in KDE 4 kdegames this isn't a problem. > This is a class from kdelibs/kdecore. That's why I was asking :). > kdelibs' audience is quite huge that's why I prefer to be careful :). > > Dmitry. >