|We don't bite newbies here... much|
Re^2: Procedural vs OOP modulesby Bod (Priest)
|on Oct 29, 2021 at 20:18 UTC ( #11138241=note: print w/replies, xml )||Need Help??|
great to see you thinking about this important topic so early in your programming career!
Haha! Thanks eyepopslikeamosquito
I suppose the second part of the original question was the more significant part for me...is there ever a case in the current day to write a module that isn't OOP. The discussion has certainly answered that there is.
To my surprise, I found that the Grade Score from this was vastly different from Hemingway for the same piece of text. I was surprised because Flesch Kincaid is a well-defined mathematical formula. After some investigation, it seems the difference comes from the difficulties in programatically counting syllables.
So I thought I'd write my own module to obtain a Grade Score. I know there are Text::Info and Lingua::EN::Fathom. The latter I am using to create a copy checker that also includes a ratio of first person to second person pronouns. Both these modules count syllables using Lingua::EN::Syllable which the author notes is not entirely accurate although this is not especially important for my application.
My instincts tell me that this is best not done using an OOP module. But I couldn't explain why. Now, given the helpful and informative discussing, I understand some of why my instincts were right. I guess my judgement was also clouded by having only written OOP modules recently. I also think that the choice was mostly right for those too.
In Section Seekers of Perl Wisdom