Click here to Skip to main content
15,922,419 members

Survey Results

How attached are you to your favourite programming language?   [Edit]

Survey period: 2 Feb 2009 to 9 Feb 2009

What do you do given the choice between sticking with the language (or languages) you know best and trying something new?

OptionVotes% 
I will only work on projects where I can use my favourite programming language1659.54
I do what I can to try to work in my favourite language36120.87
I prefer my favourite language but will work in other languages1,04360.29
I always try to work in new and different languages854.91
I have no language preference at all.764.39



 
GeneralRe: Language isn't everything Pin
ely_bob2-Feb-09 6:52
professionalely_bob2-Feb-09 6:52 
GeneralRe: Language isn't everything Pin
PIEBALDconsult2-Feb-09 7:07
mvePIEBALDconsult2-Feb-09 7:07 
GeneralI refuse to work in *some* languages. Pin
mike.strobel2-Feb-09 6:01
mike.strobel2-Feb-09 6:01 
GeneralRe: I refuse to work in *some* languages. Pin
Kevin McFarlane2-Feb-09 8:50
Kevin McFarlane2-Feb-09 8:50 
GeneralRe: I refuse to work in *some* languages. Pin
Henry Troup2-Feb-09 15:47
Henry Troup2-Feb-09 15:47 
GeneralRe: I refuse to work in *some* languages. Pin
Kevin McFarlane2-Feb-09 23:11
Kevin McFarlane2-Feb-09 23:11 
GeneralRe: I refuse to work in *some* languages. Pin
edse3-Feb-09 4:18
edse3-Feb-09 4:18 
AnswerRe: I refuse to work in *some* languages. Pin
Jakob Bohm3-Feb-09 0:42
Jakob Bohm3-Feb-09 0:42 
Actually, well-written perl programs/libraries (not the one-liners I also use) tend to be at least
as readable as C or C++, often more so. When I write longer perl programs I tend to use the same
commenting and indenting rules for all 3 languages.

But because perl is also a good tool for one-off quick-and-dirty stuff and one-liners embedded in batch files/shell scripts/makefiles etc., some perl programmers fail to write readable code even when not doing such tasks.

Of cause like for any other language, understanding the breadth and depth of the language is needed to read other peoples code fluently. If you don't understand the notation and common idioms, even beautiful code like this can be hard to read:
#!/usr/bin/perl
# Accumulate and format the foobar table data

use warnings;
use strict;
use 5.6;

my $tot = 0;

while (<> ) {
   s/^\s+//s;
   next if /^#/;
   s/\s+\z//s;
   while (/\s\\\z/ and defined(my $cont = <> )) {
      $cont =~ s/^\s+//s;
      next if $cont =~ /^#/;
      $cont =~ s/\s+\z//s;
      s/\s*\\\z/\n                      $cont/s;
   }
   s/\s*\\?\z//s;
   next if /^\s*\z/s;

   if (/^(\S+)\s+([-+]?\d+)\s+(.*)\z/s) {
      $tot += $2;
      printf "\%-10s \%10d \%s\n", $1, $tot, $3;
   } else {
      print STDERR "Unknown line ",$ARGV,"(",$.,"): '",$_,"'\n";
   }
}

(Explanation: Parse all input lines, skip #-style comment lines, join \-style continuation lines but keep the line feeds and indent the continuations 22 columns, skip blank resulting lines, accumulate signed integers in the second column and output with total as second column, left align columns 1 and 3, right align the numeric column. Column 3 is optional and will be indented 22 columns. Warn about any input not matching the expected format).

P.S.
I am sure this could be written shorter with some additional libraries or idioms, this was written to illustrate readability, not a shortest-obfuscated-perl contest.

This message is hasty and is not to be taken as serious, professional or legally binding.
I work with low level C/C++ in user and kernel mode, but also dabble in other areas.

GeneralRe: I refuse to work in *some* languages. Pin
MarcelloTurnbull4-Feb-09 3:46
MarcelloTurnbull4-Feb-09 3:46 
GeneralRe: I refuse to work in *some* languages. Pin
toxcct4-Feb-09 5:18
toxcct4-Feb-09 5:18 
GeneralI only use languages PinPopular
W Balboos, GHB2-Feb-09 5:32
W Balboos, GHB2-Feb-09 5:32 
GeneralRe: I only use languages Pin
Rob Philpott2-Feb-09 5:38
Rob Philpott2-Feb-09 5:38 
GeneralRe: I only use languages Pin
W Balboos, GHB2-Feb-09 5:42
W Balboos, GHB2-Feb-09 5:42 
GeneralRe: I only use languages Pin
PIEBALDconsult2-Feb-09 5:59
mvePIEBALDconsult2-Feb-09 5:59 
GeneralRe: I only use languages Pin
W Balboos, GHB2-Feb-09 6:04
W Balboos, GHB2-Feb-09 6:04 
GeneralRe: I only use languages Pin
PIEBALDconsult2-Feb-09 6:20
mvePIEBALDconsult2-Feb-09 6:20 
GeneralRe: I only use languages Pin
W Balboos, GHB2-Feb-09 7:12
W Balboos, GHB2-Feb-09 7:12 
Generalyet to find a languague worthy of being my favorite Pin
patbob2-Feb-09 5:23
patbob2-Feb-09 5:23 
GeneralRe: yet to find a languague worthy of being my favorite Pin
PIEBALDconsult2-Feb-09 5:57
mvePIEBALDconsult2-Feb-09 5:57 
GeneralRe: yet to find a languague worthy of being my favorite Pin
Henry Troup2-Feb-09 15:49
Henry Troup2-Feb-09 15:49 
GeneralAny language but ADA and VB.NET Pin
Ennis Ray Lynch, Jr.2-Feb-09 4:50
Ennis Ray Lynch, Jr.2-Feb-09 4:50 
GeneralRe: Any language but ADA and VB.NET Pin
Nemanja Trifunovic2-Feb-09 4:53
Nemanja Trifunovic2-Feb-09 4:53 
GeneralRe: Any language but ADA and VB.NET Pin
Ennis Ray Lynch, Jr.2-Feb-09 4:59
Ennis Ray Lynch, Jr.2-Feb-09 4:59 
GeneralRe: Any language but ADA and VB.NET Pin
Owen372-Feb-09 4:56
Owen372-Feb-09 4:56 
GeneralRe: Any language but ADA and VB.NET Pin
PIEBALDconsult2-Feb-09 6:21
mvePIEBALDconsult2-Feb-09 6:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.