Why is perl so ugly




















EduRev is like a wikipedia just for education and the Why is Perl so Ugly? Do check out the sample questions of Why is Perl so Ugly? This is your solution of Why is Perl so Ugly? To Study Why is Perl so Ugly? Related Searches. Sample Paper , mock tests for examination , Exam , Summary , shortcuts and tricks , study material , past year papers , Viva Questions , Why is Perl so Ugly?

By continuing, I agree that I am at least 13 years old and have read and agree to the terms of service and privacy policy. Why do I need to sign in? EduRev is a knowledge-sharing community that depends on everyone being able to pitch in when they know something.

What do I get? Forgot Password. People who hate it as a language in general, most likely have no idea what they are talking about. PHP with some pretty major issues as a language is quite down in the list, scoring about similar to Objective-C Sure, there are a few weird warts on the language "bless" being the most obvious example , but it's no worse than any other. After 20 years of perl coding, there are still two things which truly horrify me about the language.

Perl 5's multi-threading model is less of a wart and more of a complete shitshow. Effectively it gives you all the power of fork with all of the convenience of fork. Alot of these folks have never written any Lisp. I would take Perl hands down over Lisp any day. Lots of Idiotic Stupid Parentheses. I don't get the Delphi hate, to be honest. It is a pretty good language, comfortable to write. Well, the last Delphi I have used was Delphi 7, years ago, but from what I've heard it has become better rather than worse in the later versions.

I've been using Delphi since its inception, and its predecessors going all the way back to Turbo Pascal 3. It's a fantastic environment, the language is easy to use, and I can get a project done in half the time it takes to put the same thing together in C.

The Delphi hate seems to mostly come from. Using Delphi 10 now for quick and dirty control interfaces for my hardware projects. It's still beautiful. You can get what you want done quickly and lucidly and you don't need the editor translating whitespace into into mnemonics so you can see what's a block and what isn't. Perl is a wacky language and only bareable if you can handle old school unix stunts, no doubt. It gave birth to PHP, which speaks volumes. I remember reading an OReilly introduction to Perl and laughing at the wackyness.

I've done the same with PHP, but I've always respected both. Sort of. Unlike newfangled fads and desasters like Ruby, Perl is a language that remains usable. Complain all you want about the awkwardness of old-school languages - they still work and many of them run on just about anything that can be powered by electricity. These days I'm still a little reluctant to say which side Javascript will come up on now that Node has it's very own version hodgepodge gumming up the works. Of the three, Perl is my hands down favorite for a scripting language.

If you are writing applications in Perl though, it sucks. Funny, I quite enjoyed writing in Perl 5 and the feeling was empowerment, and the community was excellent. At the time Python was quite immature. Python has grown but Perl 5 is still quite useful.

There is also quite a difference between legacy code and code written today using modern extensions, though it seems people enjoy trashing things, instead of admitting they did not actually learn it. I can do some pretty nifty shit with it. And VBA comes into the category where it is often used by non-experts; they've done everything possible with macros and find they have to dip into VBA. This will be an unpleasant experience, because they don't use it regularly and they will already be annoyed that they can't do what they want with macros.

Mostly people who are choosing their language aren't going to hate it. We're more likely to hate languages from projects we inherited, because we're forced to work with it. Programmers have strong preferences about programming languages, and the popularity of languages rises and falls like the rankings of Top 40 pop tunes.

Film at eleven. I love perl. A quick down-and-dirty perl script is one thing, using it in reusable scripts is just immature and pointless. Especially those who refuse to document their code. My biggest problem I find with Perl is that there were SO many ways to express a similar operations, conditionals, etc. While this may be nice for single developer projects, it is utter hell if someone has to read that code. This has happened because of Perl's long life and its iterations to add more and more contemporary programming concepts.

This has made it possible and thus it will happen to make Perl code a spaghetti mess of syntaxes. This makes perl code difficult to read much less grok. It is surprising to me that enough developers have used Perl for it to be the most hated language.

My experience with the Perl hate is it's usually from younger people by which I mean anyone under about It violates everything some may have been taught as part of their software engineering program: it's difficult to read, maintain, and support. But, it exists for a reason and it's ridiculously good at that purpose. If I want to process lots of text, I do not use Python, I whip out perl.

And usually it's fine, the little bits of perl here and there that glue the world together aren't usually that egregious to maintain particularly in context of the overall mechanism it's being used to glue together, usually.

The problem is that more and more people are using scripting languages for this purpose, and it's becoming socially acceptable to do so. The slippery slope being loved by children and idiots alike, one might say "I know Perl, let's use that! It is C for lazy programmers. I tend to use it for four distinct problem domains:. When I'm done I don't need it any more. Taint is an amazing tool for dealing with untrusted user input.

I do QA and Perl is a godsend for writing fuzzers and mutators. In something reall. The quality of the program structure and the ability to read, maintain and support it are due to the programmer, not Perl. It's call being professional. To which I replied "Perl code can look like C code, but it doesn't have to. Perl code can look like line noise. My old Perl code looked like line noise. To me, after 6 months. Oh, I could clean it up, but it took me a lot of effort. My Ruby code looks a lot like C; which is nice because half my methods are also implemented in C.

And I can easily read it, even years later. There is so much overlap between the use cases of Perl and Ruby it just didn't make sense to me to keep using Perl since I suck at making it maintainable; it is just so expressive, it is too easy to let the nee.

Show me a person who hates Perl, and I'll show you a person who doesn't grok regex. Clear code with comments. Perl was my first scripting language, and quickly moved to PHP as it's easier for web based development.

This was in the late 90's. Now I've moved on to bigger, better languages, but there is a special place in my heart for Perl. I love Perl because everyone hates it. I never said I hated it, just that I would have guessed it was the most hated. Although it isn't my favorite language I really like JavaScript.

Want to see how stupid JQuery people are? Ask them to do something simple without using JQuery. So many times I see a KB library loaded to do one thing that could be done with two lines of normal Javascript. Most senior level front end developers I know nearly refuse to write boilerplate JavaScript because of browser compatibility concerns. Using a library where someone else deals with those issues is generally favorable, even if it means needing to load an 82 KB library for a single function call.

The time it takes a developer to decide if those 82 KB are necessary is n. Sure there is. If you come from a Smalltalk or Self background, the lack of sane support for numbers is a good reason to hate JavaScript. Smalltalk had a rich set of integer and floating point types, and the default integer kind was automatically promoted to a BigInt object on overflow.

In contrast, JavaScript has only one numeric type, a double-precision floating point value. Trying to efficiently represent a bit integer in JavaScript is basically impossible, trying to support arbitrary-precision integers is horrible pain.

Lisp and Smalltalk had these from the start. Then there's the lack of portable support for sane forwarding until very recently. In Smalltalk, if you call a method that doesn't exist, then the invocation is wrapped in an object and passed to the doesNotUnderstand: method. This lets you do proxy things transparently and easily. In JavaScript, this used to be impossible. Then there's the not-quite-pure-OO nature.

Everything is an object, but some of the operations can't be modified and some objects e. Or the fact that you have a single immutable prototype chain. Many of us who know perl and think you're a hypersensitive snowflake of a developer learned C before we learned Perl. What's wrong with Ruby? I find it a bit weird, but not hate-worthy. A write-only language. Perl is ONLY useful today as a server-sided processing script.

If you are using Perl on your front end, you will get dependency hell as your server updates things arbitrarily. Thus if you don't update Perl and everything that uses Perl at the same time, mass-breakage.

Thus "Don't update Perl you moron". To that end PHP is on the other side of that coin. PHP is only useful for websites and nothing else. If you run PHP as a backend script it will typically time out, or run out of memory, because it's literately not designed to live very long.

Unfortunately the monkeys that make Wordpress themes, plugins, and "frameworks" for PHP don't understand this. Symfony is popular, Symfony also is a huge fucking pain in the ass. Doctrine, gobbles up memory and gets exponentially slower the longer the process runs. Thus "Don't update Wordpress" mantra, because good lord there are a lot of shitty plugins and themes.

PHP's only saving grace is that they don't break shit to cause dependency hell, they just break API's arbitrarily, thus rendering old PHP code broken until you update it, or abandon it. Ruby is a poor all-purpose tool. In order to use it with the web, you basically need to have the equivalent of php-fpm for Ruby running, and if your server is exhausted, just like php, it just rolls over and dies. Ruby developers are just like Python developers next in that they don't fundamentally understand what they are doing , and leave crashed processes running perpetually.

At least PHP gets a force-kill after a while. Ruby Gems create another dependency hell. In fact good luck getting Ruby on a CentOS installation, it will be obsolete and broken.

Python, has all the worst of Perl's dependency hell with Ruby's clueless developers. Python simply doesn't exist on the web, but good lord so many "build tools" love to use it, and when it gets depreciated, whole projects that aren't even developed in Python, stop working. Hey it's Javascript, everyone loves javascript. If you're not competent enough to write Javascript, turn in your developers license. Despite that, just like Perl, Ruby and Python, setting up a build environment is an annoying pain in the ass.

Stick to the web browser and don't bother with it. Java is another language that sometimes pops up on servers, but it's more common in finance and math projects, which are usually secretive. Java, just like everything mentioned, breaks shit with every update. C is the only languages that haven't adopted the "break shit with every update" because C can not be "improved" on any level. Most of what has been added to the C API deals with threading and string handling.

At the very basics, anything written in C can compile on everything as long as the platform has the same functions built into the runtime.

Which isn't true when cross-compiling between Linux and Windows. Windows doesn't "main " while Linux has a bunch of posix functions that don't exist on Windows. Ultimately the reasons all these languages suck comes right back to dependency hell. A language that has a complete API, requiring no libraries, simply doesn't exist, and isn't future proof anyways. People hate a lot of these languages because they don't adhere to certain programming habits they have, like object oriented "overide-bullshit", abuse of global variables, or strongly typed languages.

Thus what should work in X language, doesn't work in Y language, because that language simply does it differently. Like weakly typed languages are probably supreme, at the expense of runtime performance, because it results in less errors. In a strong type language, you can't fuck that up. What you describe is no different than if your app uses a c runtime library that is over written by the system during an update.

You can write Forth code that is readable. If you don't want one of the parameters say, scoring , you have to overload createIndex with a second instance of the method. Done wrong, this could lead to code duplication. Done right, there is one "base" method that can handle all cases, meaning no code is duplicated. It's just not as flexible as the Perl version. A lot of my time recently has been spent considering how another programmer sees my code another programmer was recently hired where previously I was the only one.

We had to come up with certain rules for Perl programming, rules that we sort of took for granted in Java. This suggests, as you say, that Perl allows you to be more creative - but you have to weigh your creativity against your need to get the job done.

I'm not saying that you can't have both - I program because I am creative. I've found that on the job, you have to be careful about how you program. Imagine that a year or two in the future, you are the sole maintenance programmer for a system developed by ten programmers all given full rein to their individual expressions of creativity and culture. All the more reason for enforcing a site standard in style and structure.

Of course, in a well managed team, peer reviews and code walkthroughs should remove the most extreme cases of wierd individual style. I have seen so many variations of this statement and it still seems to say absolutely nothing to me about Perl.

It seems to me that you could put almost any language at the front and find some aspect s of it that fit the description. As regards the arguement-passing convention, is it really so complicated? And there is such an elegant way to use the parameter passing, the hash method; In most languages such a divergent solution from the standard wouldn't be possible. I started using an example of a string in C but decided it was long winded and didn't really add anything It just made me happy I have Perl.

C-style for loops are the classic example:. Oh, I used strict, warnings, taint checking, and whatever else I thought was "good", but I had a bad habit of writing my subroutines "COBOL-style", with the exception of passing in the arguments. Join the Perlmonks Setiathome Group or just click on the the link and check out our stats. Comment on Perl aesthetics: the good, the bad, the ugly.

Replies are listed 'Best First'. Re: Perl aesthetics: the good, the bad, the ugly. PerlMonks parthenogenetically spawned by Tim Vroom. PerlMonks somehow became entangled with The Perl Foundation.

Pathologically Eclectic Rubbish Lister. Perl aesthetics: the good, the bad, the ugly. Need Help?? Other bits of wonder I've seen.. Regexps used for XML parsing which also rely on the positions of newlines. Good thing the same company wrote the program which generates the XML really. A recursive program that executed itself with backticks. The programmer couldn't see why this was a security hole as he knew what he'd printed.



0コメント

  • 1000 / 1000