Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: Perl and Discipline - and Freedom

by adrianh (Chancellor)
on Aug 09, 2005 at 15:56 UTC ( [id://482272]=note: print w/replies, xml ) Need Help??


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

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.

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

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482272]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found