Re:Do We Create Type Systems In Dynamic Languages?
by rjurney on Monday April 06, 2009 @11:05PM
(#550189)
Perl 5 pays the bills :)
Actually, I don't have a problem with Perl 5/Catalyst http://www.catalystframework.org/ for a Startup, as long as you have several people quite good at it. If you know what you're doing, the main problem is finding good startupish Perl devs.
I confess that I don't understand your example. I'm not breaking encapsulation, I'm just verifying that a variable is defined (avoids 'variable not defined, can't call can' error), that it is an object with the method of interest (avoids 'no such method' error), etc.
In other words - I am doing a type check that its a valid object of the class I want with a non-null value on a field that should never be null. Happens all the time. This is more easily defined once in the class in a more reasonable object system. But Perl 5 without Moose has no such thing.
Which would seem to parallel the article. I could just assume that $object->foo will work, but that doesn't work out too well as code grows, because if I want my code to work or at least to easily be fixed, I have to check sanity everywhere possible.
Actually, I don't have a problem with Perl 5/Catalyst http://www.catalystframework.org/ for a Startup, as long as you have several people quite good at it. If you know what you're doing, the main problem is finding good startupish Perl devs.
I confess that I don't understand your example. I'm not breaking encapsulation, I'm just verifying that a variable is defined (avoids 'variable not defined, can't call can' error), that it is an object with the method of interest (avoids 'no such method' error), etc.
In other words - I am doing a type check that its a valid object of the class I want with a non-null value on a field that should never be null. Happens all the time. This is more easily defined once in the class in a more reasonable object system. But Perl 5 without Moose has no such thing.
Which would seem to parallel the article. I could just assume that $object->foo will work, but that doesn't work out too well as code grows, because if I want my code to work or at least to easily be fixed, I have to check sanity everywhere possible.