Slashdot Mirror


Ask Slashdot: Choosing a Web Language That's Long-Lived, and Not Too Buzzy?

adelayde (185757) writes "In my day job, I work on a web based service with a lot of legacy code written in that older (and some may say venerable) web-scripting language, Perl. Although we use Modern Perl extensions such as Moose, the language just seems to be ossifying and we're wanting to move to a more up-to-date and used language for web applications, or even an entire framework, to do new development. We're still planning to support the legacy code for a number of years to come; that's unavoidable. This is a fairly big project and it's mission critical to the business. The thing we're afraid of is jumping onto something that is too new and too buzzy as we'd like to make a technology decision that would be good at least for the next five years, if not more, and today's rising star could quite easily be in tomorrow's dustbin. What language and/or framework would you recommend we adopt?"

14 of 536 comments (clear)

  1. Perl by XanC · · Score: 5, Interesting

    Perl 5 pretty much satisfies everything you're looking for. What's the problem with Perl again?

    1. Re:Perl by Anonymous Coward · · Score: 5, Funny

      /&%#%^&*)^ADVkjR$%^$E)!HJLGAZ^&R%\jkghlk/^

      Random garbage or valid perl?

    2. Re:Perl by trudslev · · Score: 5, Funny

      Valid garbage or random perl?

    3. Re:Perl by just_another_sean · · Score: 5, Insightful

      Nobody is forced to program that way in Perl. It can be fun and may or may not look cool on a t-shirt but no one recommends that as a way of doing it. Just because there's more than one way to do it doesn't mean you should choose the worst way.

      And to the submitter, I agree with the OP.

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    4. Re:Perl by MouseTheLuckyDog · · Score: 5, Insightful

      Nobody is forced to program that way in Perl.

      Mobody is forced to write Perl that way, but many people are forced to read that kind of Perl.

    5. Re:Perl by Sarten-X · · Score: 5, Insightful

      A good language ... should do its very best to make sure you CAN'T code sloppily.

      Exactly, just like a good spoken language should make sure you CAN'T use profanity.

      ...But then, what about when profanity is appropriate? What if you need an emphasis that is so fucking strong that simply changing the tone of voice doesn't suffice? What if your whole damned speech is in reference to something condemned by a deity, or referring to Mohammed the thief, who assumed the name of the prophet?

      The point of any language is to express. For programming languages, the idea is to express instructions for two different processing styles simultaneously: the deterministic and predetermined understanding of the parser, and the non-deterministic and subjective understanding of colleagues. Similarly, spoken languages must account for the subjective understandings of every listener, some of which may have very different rules regarding obscenity.

      There is much more to coding "cleanly" than mere syntax. Structure is equally important, and it must change as the system design demands. If the rules of a language are too strict, then the whole program starts to look the same, and it's more difficult for future interpreters to understand the intent of the program.

      There is an art to writing clean code, just as there's an art to writing eloquent language. Strict rules don't always improve that art.

      --
      You do not have a moral or legal right to do absolutely anything you want.
  2. Re:Better yet... by Anonymous Coward · · Score: 5, Funny

    Anyone but Timothy.

  3. Perl still works, and PHP is fine by ShaunC · · Score: 5, Informative

    Perl may be legacy to an extent, but it's a Swiss army knife that will get any job done. I don't see it going away anytime soon.

    I know it's in vogue to hate on PHP, but PHP is relatively modern, robust, and fully capable of handling enterprise tasks. It's widely adopted and there's support everywhere. Probably half of the websites and services you use every day are built on PHP, it's certainly not the worst language you could choose.

    --
    Thanks to the War on Drugs, it's easier to buy meth than it is to buy cold medicine!
    1. Re:Perl still works, and PHP is fine by Anonymous Coward · · Score: 5, Insightful

      Sure, on paper it looks like you'll have a large number of viable candidates, but when you start interviewing you learn that the PHP "talent pool" is mostly just a pool.

      It's just as quick to hire a real developer and train them in PHP.

    2. Re:Perl still works, and PHP is fine by Mordok-DestroyerOfWo · · Score: 5, Funny

      > PHP is relatively modern, robust

      No it isn't

      Skillfully refuted!

      --
      "Never let your sense of morals prevent you from doing what is right" - Salvor Hardin
    3. Re:Perl still works, and PHP is fine by danudwary · · Score: 5, Funny

      No it isn't.

  4. Re:Better yet... by tbuddy · · Score: 5, Funny

    +9001 Funny.

  5. Remove the ransom note excuse with Deparse by ksbraunsdorf · · Score: 5, Interesting
    If you don't like ransom notes (which perl programs may become over time) use this trick: get perl to reformat the code with a this command:

    $ perl -MO=Deparse ransom.pl >better.pl

    Most of the time that removes the crazy from the script. I just got a large legacy code-base and that little trick made my life much better. If the perl code works, then you are just looking for work to do. Newer is not always better.

  6. Fractal rant makes about six good points by tepples · · Score: 5, Informative

    Anyone cosidering PHP should read this the now infamouns "PHP is a fractal of bad design".

    Which must be balanced with the "hardly" rebuttal. For example, PHP lets a program solve the exception/warning dichotomy cleanly in about six lines of code; see the manual's page about the ErrorException class. This leaves about a half dozen legitimate complaints:

    • No way to turn off the language's loosely-typed comparisons.
    • Parse errors and undefined function errors are fatal rather than throwing an exception that the caller can catch.
    • Inconsistent naming conventions in the standard library.
    • Associativity for the ternary ?: operator is the less useful side.
    • PHP allows the server operator to change program semantics in ways that are annoying to work around, such as not allowing a shared hosting subscriber to turn off "magic quotes" or not following HTTP redirects in libcurl.
    • PHP versions change the semantics of existing programs in ways that encourage shared hosting providers to continue to offer only outdated versions of PHP, making it impossible for web application developers to take advantage of new features.