Tag Info

Hot answers tagged

233

When I'm going to performance, the first and last choice is C. And that’s where you should back up. Now, I cannot, at all, speak for server development. Perhaps there is indeed no compelling reason to prefer C++ over the alternatives. But generally speaking, the reason to use C++ rather than other languages is indeed performance. The reason for that is ...


192

I advise people to never hire Perl programmers, or C programmers, or Java programmers, and so on. Just hire good people. The programmers who I've hired to write Perl were also skilled in various other languages. I hired them because they were good programmers, and good programmers can deal with multiple languages. Now, that code does look a lot like C, but ...


104

I see way too many C programmers that hate C++. It took me quite some time (years) to slowly understand what is good and what is bad about it. I think the best way to phrase it is this: Less code, no run-time overhead, more safety. The less code we write, the better. This quickly becomes clear in all engineers that strive for excellence. You fix a bug in ...


91

His code is a little verbose. Perl is all about modules, and avoiding them makes your life hard. Here is an equivalent to what you posted that I wrote in about two minutes: #!/usr/bin/env perl use strict; use warnings; use Text::CSV; my $parser = Text::CSV->new({ allow_whitespace => 1, escape_char => '\\', ...


60

First of all, it's always better to disambiguate. Businesses talk about Perl 5 when talking Perl, but on a far-far land, beyond deep-thinking island, the design-by-committee tribe is still cooking a hefty slab of Perl 6 (and it's almost ready, with an engine written in Haskell and powered by the tears of the gods) Ok, that said, what is Perl 5 ...


59

I've found Python to be the most natural programming language that I've ever written code in. I've coded in a lot of languages before and after Python, and to a greater or lesser extent, you have to fight the language to get it to do what you want. Python reduces this struggle massively. Eric S Raymond said it much better than I can in Why Python? As a ...


55

Is there any satisfiable reason to use C++? Templates and the STL. You trade a little build time (and some potentially incomprehensible error messages) for a lot of useful abstraction and labor-saving tools, with no appreciable run-time performance hit (although the binary footprint may be a little larger). It takes a while to wrap your head around ...


54

RAII for teh win baby. Seriously, deterministic destruction in C++ makes code much clearer and safer with no overhead whatsoever.


52

I would argue writing C in Perl is a much better situation than writing Perl in C. As is often brought up on the SO podcast, understanding C is a virtue that not all developers (even some good ones) have nowadays. Hire them and buy a copy of Perl Best Practices for them and you will be set. After best practices a copy of Intermediate Perl and they could work ...


49

Python is a well-designed language with a reasonably clean syntax, a comprehensive standard library, excellent included and third party documentation, widespread deployment, and the immediacy of a "scripting" style language (ie. no explicit compile step).


45

It isn't dreadfully idiomatic Perl, but it isn't completely dreadful Perl either (though it could be much more compact). Two warning bells - the shebang line doesn't include '-w' and there is neither 'use strict;' nor 'use warnings;'. This is very old-style Perl; good Perl code uses both warnings and strict. The use of old-style file handles is no longer ...


45

First of all, stop thinking that your job is not bringing your further towards your dream job! Every job does! Everything is only up to you! This is your first job after your graduation and everyone can understand that you didn't have a good choice or might have considered some other factors, like moving to the place where you'd like to stay. This is a ...


32

Yes. If you're looking for executable efficiency, you're down to C or C++, so I'll focus on that. Even before templates were common, I preferred using C++ over C for the kinds of executables you discuss as early as the mid 1990s for two very simple reasons: object polymorphism and RAII. I've used polymorphic C++ objects for all kinds of interesting ...


28

The only universal definition I know of for "regular language" is one that can be parsed with a deterministic finite automaton, or expressed as a true regular expression (not the extended REs in many current implementations). A regular expression can be written in a series of characters, with potentially infinite repetitions and alternate selections. Since ...


27

I have to (sort of) disagree with most views expressed here. Since the code in question could be expressed much more compact and maintainable in idiomatic Perl, you really need to pose the question how much time the candidate spend developing this solution and how much time would have been spent by someone halfway proficient using idiomatic Perl. I think ...


27

Perl is a high-level, general-purpose, multi-paradigm, interpreted, dynamic programming language. Java is a high-level, general-purpose, mostly single-paradigm, statically typed programming language. So, both are high-level: A high-level programming language is a programming language with strong abstraction from the details of the computer. and ...


26

C++ is about as fast as C (some things are faster, some slower), and it offers better abstractions and organization. Classes work similarly to primitive types, allowing large amounts of code to be used without being held in mind. Operator overloading and templates make it possible to write code that functions better if data representations change. ...


23

Aside from the inherent virtues of Perl, part of this is simply history. There was a major expansion of bioinformatics at the turn of the century because of the Human Genome Project. At the time Perl was by far the most popular scripting language in general use. Ruby and Python were certainly around, but didn't have nearly the support/mind share they do ...


23

In my opinion, after working with Perl again after a few years of nearly not using it, it is better than ever. Perl 5 has a lot of awesomeness in CPAN, even OO can be done right now. (Have a look at Modern Perl) Perl 5 is far from dead. Just have a look at some Perl websites and CPAN and on the horizon there is a whole new language - Perl 6. There are many ...


22

I regard C++ as a language of the 1990s, a language of a bygone era. Back then it was big because it offered higher-level language constructs and mechanisms at a lower cost in terms of performance. It was the universal tool for developing everything from address book applications to avionics software, and that inspired the OO craze. OOP solved hunger and ...


22

The main thing Perl still has going for it is CPAN - there are so many pre-written modules that it's very easy to find something you need. That said, I would not learn Perl. Perl is a great language for people who know it already (like me), but Python seems to be (from my outsider's perspective) a better language for doing the sort of quick and dirty file ...


20

Looking at most (if not all) dynamic languages [i.e Python, PHP, Perl and Ruby], they are all interpreted. Not true. You can compile Python source. That's one existential proof. There are interpreters for statically-typed languages, and compilers for dynamically-typed languages. The two concepts are orthogonal. Side note: In general, a language is ...


19

I hope this doesn't sound too cynical, but IMO Python is so popular for the exact same reason Java, C# and Objective-C are. Not because there's anything spectacular about the languages themselves, but because they've each got a magacorporate sponsor that's able to produce a lot of hype, a lot of advertising, and a lot of libraries and support for their ...


19

If you design your application properly, with adequate separation of presentation and content, you can bring in your web designer, who can provide you with the needed CSS and graphics, and it shouldn't matter what language you develop the backend in.


19

According to Linus, no : When I first looked at Git source code two things struck me as odd: 1. Pure C as opposed to C++. No idea why. Please don't talk about portability, it's BS. YOU are full of bullshit. C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the ...


19

Ten years down the lane there will be a similar question 'Is there any good reason for someone who knows language X to learn Python' or 'What is Python 'better' at than language X'? In other words inside the hype cycle it looks like a particular technology may stay around for a long time. I will stop at that. Since you've specifically asked whats Perl ...


19

Some points: As a Perl developer, pretty much any company will expect you to know MORE than Perl. Even in pure Perl shop, you need to know (ideally) JavaScript/overall web development; and SQL for back-end work. And most companies have a mix of languages, so you should be prepared to be Perl/C++ or Perl/Java or whatever else is needed. Much as the fact ...


19

When I decided to learn Perl as my first language a few years ago there were a number of factors that guided my decision: is there a lot of good reference material on the language? can I easily find help with my questions? is the language in active use by a large diverse population? are there active projects that will help me with my goals? For me the ...



Only top voted, non community-wiki answers of a minimum length are eligible