7 ms·
There's a lot more to Types vs No Types than Java vs Ruby would imply!
by weavie 9y ago
There's a lot more to Types vs No Types than Java vs Ruby would imply!
- nine_k 9y agoIndeed. You learn e.g. Haskell and find that Java painfully lacks in the types department. You learn Perl and find that Ruby is unexpectedly rigid in the types department :)
- yellowapple 9y agoPerl also has the ability to effectively build class instances from scratch by manually blessing arbitrary data structures (usually hashes, but not much stopping you from blessing an array or scalar). For some folks (like me), it's a blessing for making hard problems at least slightly easier to solve. For others, well, there's always Moose. Basically, a lot of Perl's object-orientation weirdness derives from it all being exposed to you. It's an excellent learning experience if you ever want to know what it means to be a "class" or an instance thereof, since "methods" are just ordinary subroutines that expect your object (or class, for constructors) as the first argument, and class instances are just ordinary scalar/array/hash objects blessed with a package name. Nothing hidden or abstracted away. Simple and flexible enough to fit into the TMTOWTDI philosophy.