in reply to Perl and Discipline - and Freedom

Perl allows a lack of discipline, but that's not really the same as encouraging it. Unlike some B&D languages like Pascal, Perl will allow me to do some very careless and risky things, if I want. Perl does not force me to behave myself.

Actually I do think there are places where Perl does encourage lack of discipline - in that the "bad" way of doing some things is simpler and/or more obvious than the "good" way.

Replies are listed 'Best First'.
Re^2: Perl and Discipline - and Freedom
by revdiablo (Prior) on Aug 09, 2005 at 15:25 UTC
    I do think there are places where Perl does encourage lack of discipline

    Sure, I'd even go so far as to say there are a lot of places like that. But a lot of problems don't require much discipline at all to solve. I think it's great having a language to make those easy things easy, as the cliche goes.

    On the other hand, when the problem at hand does require more rigor, Perl can usually accomidate that. It may be more work -- which I suppose is sort of implied by "discipline" -- but it's possible. It's the flexibility of Perl that I really like, not the type of code it enables or encourages.

    Update: I don't feel a further reply to his reply is necessary, but I do want to say I agree with adrianh completely.

      On the other hand, when the problem at hand does require more rigor, Perl can usually accomidate that. It may be more work -- which I suppose is sort of implied by "discipline" -- but it's possible. It's the flexibility of Perl that I really like, not the type of code it enables or encourages.

      Yeah, but in many cases there is no clash between flexibility and the "right way" of doing it - it's just poor design in Perl 5. The addition of decent simple OO encapsulation of state and behaviour in Perl 6 don't make the language less flexible, they just make it far simpler to write "good" code.

        It's pretty darn easy to write lazy code in any language. Java for instance allow you to write empty exception catch blocks, PHP lets you go without OO or use strict much like Perl.

        Perl and others therefore allow a freedom to display a lack of education or a lack of discipline(lazyness).

        This can be a good thing though as there are many situations where undisiciplined(bad) code does not matter and the development speed does. This especially applies for one off throwaway scripts, (It can be great to know your code will be useless after x occurs)

        Discipline often takes more time and patience which is why it is frequently skipped with an evil laugh:)