in reply to Re: Perl and Discipline - and Freedom
in thread Perl and Discipline - and Freedom

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.

  • Comment on Re^2: Perl and Discipline - and Freedom

Replies are listed 'Best First'.
Re^3: Perl and Discipline - and Freedom
by adrianh (Chancellor) on Aug 09, 2005 at 15:56 UTC
    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:)

        This can be a good thing though as there are many situations where undisiciplined(bad) code does not matter and the development speed does ... Discipline often takes more time and patience which is why it is frequently skipped with an evil laugh

        Yes, but are these trade offs always necessary? Can we write good code quickly? Can we design languages that makes the "right" choice easier without impacting flexibility?

        Fools will write bad code in any language. Geniuses will write wonderful code in any language. However in the middle ground there are a lot of reasonable people trying their best to do a decent job - and I want my programming language to help as much as possible.

        I think it's harder to write bad code in Perl 6 and Ruby because they naturally support some features that you have to jump through hoops to get in Perl 5.