User Experience for non-Perl users

I’m currently weighing up the pros and cons of making changes to exercises geared towards object oriented programming, to remove a potential obstacle for people unfamiliar with Perl.

Currently, OOP exercises suggest using a module called Moo. I’d be inclined to call it an industry standard for OO in Perl.

Perl has recently introduced built-in OO features, which are still in development, but sufficiently functional enough for completing any exercise on the track.

If I replace Moo with the built-in functionality, it eliminates all additional dependencies for CLI users, they would have to do nothing more than install the latest version of Perl, or a helper module if that otherwise isn’t possible.

If I keep Moo, there are more resources and guides available for using it, but every CLI user unfamiliar with Perl has to go through the process of either installing a new package or figuring out for themselves an alternative way to build their implementations.

Do you think either of these approaches is more preferable than the other?

It’s a tough one! As you mentioned, there are prons and cons for both. One big downside to changing the exercises would be that existing solutions would become invalid (I assume they’re not compatible?). Maybe for new exercises you could consider not using Moo?

The existing solutions would still be compatible, and Moo would still be supported, its just the stubs given to new users that would change.

The tests are written to be broadly compatible with various OOP modules.

Then I think changing the stubs to not use Moo makes sense. I assume that in general people will start using the built-in functionality?

But are you forcing people to upgrade their available Perl? A conservative distro like Ubuntu is typically slower to upgrade.

I would move toward deprecating Moo but as we go. Like you mentioned, a user that uses a newer version of Perl will have the support, not changes required (except if the tests are requiring something they do not have, such as the Moo package), but hopefully we have avoided that as a dependency of the tests themselves.

At the point that the older version of Perl is deprecated we can then remove the Moo references.


Meta: Can we move this discussion to the Perl category? This does not seem relevant to the Building Exercism CLI category.

No, it should still be possible to use older Perls, possibly all the way back to 5.20. 5.40 should be completely seamless, older Perls need to install Test2::V0 and Feature::Compat::Class. 5.40 is not currently seamless due to some stubs using Moo.

I like the idea of ​​the new builtin Perl OO system. I’m familiar with Moose/Moo/etc, but I think it’s easier for people to adopt Perl if they can just install the latest package from the distribution and use that.