DEV Community

loading...

Discussion on: Random integer generation in an interval with Modern OOP Perl

Collapse
mjgardner profile image
Mark Gardner

I have to agree with your one-liner; writing a whole class for this seems a bit much.

Collapse
smonff profile image
🌌 Sébastien Feugère ☔ Author

Yer, I guess it is overkill, plus, some people could find it slow (me I have time, 1 second is ok to me to get a random number).

The idea is also to show off a bit of the Modern Perl™ OOP capabilities, maybe some people would be like « oh, this is Perl? It changed! ». Because I feel like Zydeco is an already usable OO system that is the closest to what Corrina seems to become. We will have to wait a bit more before being able to play with the "modern" core OO capabilities, but this is totally usable.

Collapse
mjgardner profile image
Mark Gardner • Edited

Those people need to realize you don't always need OO. One of Perl's strengths is that it's multi-paradigm: you use the style that best fits the problem.