Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1177 (closed enhancement: fixed)

Opened 16 years ago

Last modified 16 years ago

Kiss next32 should be more verbose

Reported by: keinfarbton Assigned to: kris
Priority: major Milestone: 0.99.7
Component: Tango Version: 0.99.6 Jeff
Keywords: Cc:

Description

next() returns uint, next32() returns double. I think this is unexpected if one is not aware of Kiss also returning doubles. One would easily think about 32 vs 64 bit integer values. Making it a bit more verbose can avoid errors.

E.g.

   double nextDbl32();
   double nextDbl52();

Change History

07/06/08 16:56:38 changed by mandel

nextDbl32 looks a bit obscure to me; can't we just write nextDouble32() etc.?


Anyway, would it be good idea to also have a next() that returns size_t and ulong?

Maybe this way?:

size_t next();
uint nextInteger32();
ulong nextInteger64();
double nextDouble32();
double nextDouble52();

On the con side, along with max and min/max arguments we would have an inflation. Templates to the rescue?

07/06/08 20:18:49 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.

now called toReal()