eiffelroom

CQS

article

Random numbers

People who are used to other programming languages usually use some kind of rand, rnd or similar function to generate random numbers. This article shows how you can do it in Eiffel.

Generating a random number

The base library's RANDOM class is modeled as a sequence of random numbers.
blog

Implementing CQS

colin-adams's picture
in

When I first learned Eiffel, I learned the design pattern for getting results back from commands - storing the result in an attribute of the class being changed. And I dutifully followed it religously.

More recently, I have encountered situations where this pattern seems to be undesirable. If the command can be re-invoked recursively, then things can get tricky.

Syndicate content
about - contact