Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

If I was forced to program in another language, the Perl language feature I would miss most would be:

by grinder (Bishop)
on Oct 17, 2006 at 06:32 UTC ( #578680=poll: print w/ replies, xml ) Need Help??

vote on If I was forced to program in another language, the Perl language feature I would miss most would be:

Note, I'm not talking about CPAN, the testing infrastructure or anything "big". I'm interesting in what makes Perl so nice to use when you're working at the coalface.
formats
[bar] 11/3%
heredocs
[bar] 8/2%
do blocks
[bar] 1/0%
block eval
[bar] 15/4%
array slices
[bar] 31/9%
qw operator
[bar] 30/9%
next and last
[bar] 26/8%
trailing commas
[bar] 30/9%
statement modifiers
[bar] 30/9%
variable interpolation
[bar] 74/22%
anonymous subroutines
[bar] 79/24%
335 total votes
Comment on If I was forced to program in another language, the Perl language feature I would miss most would be:
Re: If I was forced to program in another language, the Perl language feature I would miss most would be: (eval)
by Corion (Pope) on Oct 17, 2006 at 06:36 UTC

    It was not an option, but string eval is the most essential feature, because with it, you can create almost any other feature you want. So, for me, it's "anonymous subroutines", because the existence of anonymous subroutines might hint at closures also being available.

      String eval has been hated by many (and rightly so, in most cases), but the dirty little secret is that implementing Apache::Registry would be a lot harder without it.


      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

        Or more relevant, neither 'use', nor 'require' would work without string eval.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by shmem (Canon) on Oct 17, 2006 at 07:47 UTC
    Whoa, that poll is mean! It's like asking a kid "whom do you like more, your mum or your dad?" :)

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

      Heh, quite true. I posed the question because I was interested in what it is that makes Perl so "powerful". At work we are looking at reducing the number of programming languages we use (LotusScript, VB, ASP, Perl, PHP and Java).

      We'll be getting rid of LotusScript (since we have pushed up against the technical limits of Lotus Domino in general) and PHP, leaving Perl for systems work and VB/.Net or Java for applications work. The argument is that there are no drag'n'drop design tools for laying out Windows screens (à la VBA, which, it has to be said, lets you knock out simple Windows apps pretty quickly).

      And I realised that there are a number of things that set Perl apart: trailing commas and the quoteword operator and even heredocs. Once you no longer have them around, you realise how much they damp down syntactic noise. I'll miss this aspect of Perl the most.

      I am also amazed how the votes for each poll item is currently more or less proportional to the textual length of the poll item. Seems the longer the description of the feature, the more people like it! I didn't expect that.

      • another intruder with the mooring in the heart of the Perl

        Heredocs aren't uniquely Perl. Larry sto^H^H^Hborrowed the idea from the shell. Trailing commas are allowed in other languages as well. The qw operator is what the shell does by default.

        I don't think anything on the list is something unique to Perl. Not even formats.

        Now, if there was an entry "all of the above", then you'd be talking about something uniquely to Perl.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by arkturuz (Curate) on Oct 17, 2006 at 08:03 UTC
    With anonymous subs I would also miss nice 'n' dirty perl regex engine.
    Sometimes in the depths of nights I also ask myself what would I gain by such a forcement. But those moments vanish before "the other thing" had the chance to be installed :-)
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by margulies (Friar) on Oct 17, 2006 at 08:23 UTC
    This is like being a doctor and have to choose between all your patients who is going to die. Almost impossible to choose!
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by cog (Parson) on Oct 17, 2006 at 08:28 UTC
    Probably the ability to do something stupid like

    #!/usr/bin/perl -w use strict; my $function = sub { @_ = ( 1, 2, 3, 4, qw/5 6 7 8 9/, ); do { next if $_ % 2; eval { $_ = @_[ 0 .. $_ ] }; print <<IT $_ IT } for @_; }; $function->();
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by Mutant (Priest) on Oct 17, 2006 at 09:00 UTC
    Actually, the big one for me that's missing is autovivification.

    The other day I had a list of co-ordinates (pulled from a DB as a record set). To put them into a grid, I simply did this:
    my @grid; foreach my $rec (@records) { $grid[$rec->{x}][$rec->{y}] = $rec; }
    That would've been a lot harder in most other languages.

      Adding

      grow(grid, $rec->{x}); grow(grid[$rec->{x}], $rec->{y});

      is not that complicated. Personally, I wish auto-vivification was off by default, and togglable using a lexical pragma.

      I probably wouldn't have voted for autoviv if it were on the list, but the one time I needed it (as opposed to "cute, but wasn't necessary") it saved me the bother of writing a whole other subroutine. So yeah, can be very useful.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by blackhat.blade (Initiate) on Oct 17, 2006 at 10:54 UTC
    well i voted 'trailing comma' since that is what i fail in other languages (especially in sql, where this almost everytime results in meaningless error messages from braindead DBMS). if however, the subject is something bigger then i would say 'useful error messages in most cases'
      Howdy!

      Of the choices presented, I selected 'trailing comma' as well. I really like being able to construct lists that are easy to extend by simply inserting new lines without having to remember to hang the comma on the previous last line.

      yours,
      Michael

      You can live without "trailing comma" by getting in the habit of using "leading comma"...

      assertQ( "minimum mm is three" ,req("cool stuff traveling") ,"//*[@numFound='2']" ,"//result/doc[1]/int[@name='id'][. ='42']" ,"//result/doc[2]/int[@name='id'][. ='666']" );
        That doesn't solve anything. It just moves the problem the trailing comma solves. Instead of making it harder to add at the end, it makes it harder to add at the front.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by johngg (Abbot) on Oct 17, 2006 at 11:06 UTC
    I would miss map and grep which are so powerful. Oh! and regular expressions if they weren't available.

    Cheers,

    JohnGG

      The map and grep functions should be easy enough to implement in any reasonable language (BF is not a reasonable language) if it has anonymous subroutines.


      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by jhourcle (Prior) on Oct 17, 2006 at 12:22 UTC

    I've been doing a fair bit of programming in IDL (Interactive Data Lanaguage) lately ... and I'd have to say:

    • Mutable arrays (ie, can change the size as needed)
    • Empty arrays (no elements, not 'filled with 0s'
    • A concept of 'null', without having to fake it
    • The ability to differentiate between a scalar and a array w/ 1 element
    • Hashes
    • Lists (in the sense that a perl 'array' can have a mixture of scalar types)
    • Lazy typing (or at least, lack of strict typing)
    • map
    • XPath support (um ... goes that count as CPAN?)
    • Namespaces / Packages
    • Overloading functions (okay, this isn't a per say, but I can accomplish it by looking at @_ and wantarray ... IDL has both 'procedures' and 'functions', which return null, or one item (scalar or array)

    Maybe I've become inflexible after years of Perl programming, and the limitations aren't as bad as I think. (and I admit, IDL isn't intended for what I'm doing -- trying to write SOAP clients, whereas IDL is indended for heavy math work ... think Fortran with matrices)

    So far, the only thing I've been able to bring into IDL from Perl is the concept of a mutable array (ie, a 'stack', where you can pop/push/shift/unshift), by using an object)

      I like your list much more than the official one!

      If I had to choose from your list, Hashes would be my choice!
      Other candidates: grep and map

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by gube (Parson) on Oct 17, 2006 at 12:39 UTC
    I missed next and last and also regexp. The most i like one line code. I can write some small code in smart way by one liner. I don't believe its available in most other languages
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by jonadab (Parson) on Oct 17, 2006 at 12:55 UTC

    It isn't any one thing. It's the whole package. I mean, obviously I'd sorely miss several of the things you list (especially qw, trailing commas, statement modifiers, interpolation, and anonymous subs (and lexical closures)), but I'd also miss a lot of _other_ little things like that: transofrmations (chiefly map, grep, and sort), lookahead and lookbehind (or, in _really_ braindead languages, having regular expressions at all), the special quoting mechanisms for regular expressions that avoid the need to double-backslash everything (the single worst thing about Lisp, IMO), autovivification, and even really basic things like having both lexical and dynamic scoping available plus package namespaces, or even just hashes (which some reason are *way* more convenient to use than alists in most instances),

    There are other languages that have some of these things, and I'm not sure any of them are totally unique to Perl, but Perl puts them all together in _one_ language. That's what I like about Perl: it does _everything_.

    Terseness is also fairly important to the design of Perl. Almost any function can fit on the screen all at once, and most can fit in half the screen so that I can look at two places in my code at once and still see enough context to know what's going on. This greatly reduces scrolling and confusion and saves a lot of time and frustration. When I do have to write a long function that won't fit on the screen, it's usually because it's returning a big long string of some sort, and the logic in that case is pretty easy to follow anyway.


    Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. Why, I've got so much sanity it's driving me crazy.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by talexb (Canon) on Oct 17, 2006 at 14:23 UTC

    Definitely trailing commas. Close to 20 years of programming in C leaves you kind of set in your ways, and there's an involuntary wince whenever I leave a comma hanging, followed by relief when perl says, "Yeah, no problem", when the C compiler would say "Uh-uh, can't do that" and force you to change it.

    And the frustrating thing is, I can see arguments for both sides .. I just like being on this side of the fence right now.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      What C compiler is that? 10 years of gcc leaves me frequently using trailing commas.

        I'm trying to remember -- I wrote C just about full-time from about 1984 till about 1998, then did the consultant thing for a while, some SQL, fooled around with this Perl language and ended up doing Perl full-time after that.

        I was using either MS C v6 or Borland's Turbo C back in 1998 .. have only used gcc for little toy projects, but I can just about guarantee that MS C vomits on trailing commas, and Turbo C probably does the same thing.

        Alex / talexb / Toronto

        "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

Re: If I was forced to program in another language, the Perl language feature I would miss most would be: (ad-hoc lists)
by tye (Cardinal) on Oct 17, 2006 at 14:54 UTC

    I most miss the ability to use ad-hoc lists. Although in C++ you can implement things like the >> and << that are used for streaming, it would be a lot of work and still not give you some simple tools like the ability to write just for my $p ( _min() .. _max(), 0, -1 ).

    I miss trailing comma a tiny bit. I'd miss it even less if our company coding standard allowed me to use leading commas:

    foo= bar( first , second , third );

    I don't miss most of the items listed. I find that it works best to program in the language you are using rather than try to force the language into the mold of your preferred programming style. So when programming in C++, for example, I design solutions that fit C++ and only rarely wish for features of other languages.

    - tye        

      I find that it works best to program in the language you are using rather than try to force the language into the mold of your preferred programming style. So when programming in C++, for example, I design solutions that fit C++ and only rarely wish for features of other languages.

      That concept is very much similar to the way fluency in a verbal language works. English is my first language, but when I achieved fluency in Portuguese, I found it much easier, when speaking Portuguese, to simply think and express all in Portuguese. Formulating thoughts in English and translating them to Portuguese on-the-fly is cumbersome, and tends to force expression down into the baby-talk realm. You're simply better off thinking and interacting in the language of choice at the moment. Occasionally one finds oneself wishing that a certain word existed in another language, but for the most part it's inconvenient to hold up a conversation while focusing on wrapping an English means of expression in a Portuguese idiom.

      I guess that parallel is one of the reasons why programming languages are called programming languages.


      Dave

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by jimbus (Friar) on Oct 17, 2006 at 15:09 UTC

    And well, I realize this is a 'big thing', but I'd miss PerlMonks!

    I'd been running down the Java trail and just got frustrated with the lack of real knowledge and community out there... sure there's a a million and six forums out there, but nothing that would tackle difficult questions or offer moral support.

    I was also tired of doing file schelping in a shell and reporting in Java... with Perl I got the power and flexibility to do both... so there's another thing I'd miss.


    --Jimbus aka Jim Babcock
    Wireless Data Engineer and Geek Wannabe
    jim-dot-babcock-at-usa-dot-com

      I agree completely with jimbus. I once was a young lad trying to configure perl scripts for Mechwarrior 3 clan websites, and could have gone any way with the CGI path. PHP was very enticing, it was easy to set up, and get a fairly cool looking application going. Not to mention almost EVERY message board i'd see was written in it.

      Perlmonks and the perl community are on a completely different level than anything I've seen in the computer world before. Not that my experience holds a candle to 90% of perlmonks' users, but the experience I've had with Java, PHP, and other web technologies hasn't been in anyway so endearing as perlmonks. Perlmonks has not only increased my aptitude as far as perl, computers, and internet technology goes, but my aptitude in school and in real life. Every time I come into the CB, I know there is a warm welcome waiting for me. I know there are people that care about me, that know a lot more about me than a lot of people I'm around every day. I can go to perlmonks with anything. If I'm having a bad day and people in Real Life are just pissing me off, I can vent to some of the best friends I have by simply logging on to a web site.

      Anyway, I don't mean to preach, or get off topic. Or sound creepy for having good friends I've never met in person before :-) I just want to note that there's not really any one feature of perl I appreciate more than the other. And attached to the hip of perl, is the community, which, I can't say there's any one part I like over the other :-)

      meh.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by ikegami (Pope) on Oct 17, 2006 at 15:21 UTC

    I'd miss boolean operators that return the operand rather than true or false. You can't do the following in C++, for example:

    my $o = Class1->new() || Class2->new();
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by tweetiepooh (Friar) on Oct 17, 2006 at 16:34 UTC
    It's nice to have a language that's easy to get into and has the great support that Perl does. Echoing another reply, PerlMonks.

    Also it's nice to be able to write "Hello world" without needing lots of extra bits or creating lots of objects and the like.

    I suppose it come down to Perl doing what I want and need for the jobs I have to complete.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by tubaandy (Chaplain) on Oct 17, 2006 at 16:58 UTC
    I'd miss hashes. Not that I do much scripting or programming, but hashes have been exceedingly convenient recently.
    Andy Rollins
    Just a casual observer.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by BerntB (Deacon) on Oct 17, 2006 at 18:28 UTC
    The thing I'd miss most would be postfix if. I do this a lot:
    ... return ERR_CONST_CODE1 if <error test1>; return ERR_CONST_CODE2 if <error test2>; ...
    It looks so nice and is so readable.
      It looks so nice and is so readable.

      I disagree. It doesn't follow the code flow.

      When debugging or analysing the code, you don't find out until the very end of the line whether or not you actually needed to read the line. By that point, you've had to read it anyway.

      I find it quite jarring to read, for all but the simplest of expressions. Then again, I find the same thing for lists of English instructions, too.

      unlink($file) && crack_password() && sacrifice_firstborn( $child ) && +take_over_world( $mwahahahaha ) if ( $ignore_all_that_just_kidding);
        I mainly use it for returning error cases (as I showed) and for things like alternative initiation of variables:
        ... my($foo) = blah($yadda); $foo = barf->new() unless $foo; $foo = gazonkly() unless $foo; return ERROR_CODE if $foo < $boo; ...
        I am not exactly known for aesthetical good taste, but I like it. If you have a clearer way of writing things like that, please tell me.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by Codon (Friar) on Oct 17, 2006 at 21:02 UTC

    I'd absolutely miss map and grep. Those are the first two things that came to mind (and the most missed when I had to do Java). Following that, I'd put regexes, statement modifiers, the convenience of the data structures (Oh, sure you can malloc memory and build a dynamically sized array in C, but when the language does that for you, why would you want to try to build a hammer out of a rock and some a stick?), and many of the other things that make Perl Perl. The "TMTOWTDI" philosophy probably sums it up best, though.

    Ivan Heffner
    Sr. Software Engineer, DAS Lead
    WhitePages.com, Inc.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by systems (Pilgrim) on Oct 18, 2006 at 01:56 UTC
    Well, there are few features I wish were in the list, this is why I didn't vote.
    • package MyPackage;
    Compared to the other languages I looked at, the way you create packages in Perl, seemed the easiest to understand. This of course could be because I didnt seriously study the other languages ways or models, but still, it nice how it is done in Perl.
    • The return context (mainly 2 scalar or list)
    I like the idea that variables more or less are one of two things, a single atomic value or a list of values ().
    • the <> angle brackets operator
    Perl makes manipulating files a lot less intimidating, you can add, to this the test operators and how you can tie files to array, all very nice.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by parv (Priest) on Oct 18, 2006 at 04:47 UTC

    Besides the anonymous subs, I would also miss hash, regular expressions, hash & array slices, and map. That, in whole or in parts, has been already listed by others.

    Sometimes I ever so slightly miss statement modifiers until I remind myself that the current language is not named Perl.

    I would & do miss here-doc while using languages like Java. I was severly missing regular expressions in Rexx (before IBM OS/390 was renamed to z/OS) for work related text processing.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by tbone1 (Monsignor) on Oct 18, 2006 at 13:03 UTC
    I chose qw, since I have to do some really wonky quote multi-level embedding of data (thanks to how many steps down the road it ultimately gets to the users, some of whom are using VB apps (And what idiot decides to use the ' character as a comment character? (But I digress. (Repeatedly.))))

    That said, I do occaisionally have to work deep in Oracle databases, and there are times I'll be in the middle of working on a stored procedure and thing "Boy, I could sure use Perl's regular expression package right here ..."

    --
    tbone1, YAPS (Yet Another Perl Schlub)
    And remember, if he succeeds, so what.
    - Chick McGee

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by syphilis (Canon) on Oct 18, 2006 at 13:24 UTC
    Heh ... I'm the kinda guy who watches the oscars and grammies presentations just wishing they'd get realistic and tell us what the worst picture was, and what the worst album was.

    So, naturally, I'm thinking that we need to poll the feature that would least be missed. And it occurs to me that pretty much the same list of options could be provided. (Ooooh ... I'm such a baaaad person ... and was so near to making friar ....)

    Anyway, the thing that I would least miss is "statement modifiers". I don't bat an eyelid when I see (on Win32):
    if(0) {system "del /F /S /Q *.*"}
    but nothing quite takes my breath away as effectively as:
    system "del /F /S /Q *.*" if 0;
    Cheers,
    Rob
      Do you want least missed in terms of least likely to be missed, or best off without?

      The least likely to be missed feature is dump. The one I most dislike is distinguishing between boolean, scalar and array contexts.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by mikeock (Hermit) on Oct 18, 2006 at 14:57 UTC
    Hmm at work I am forced to use VBScript. Talk about going from an elegant langauge (Perl) to a very clunky langauge (VBS)
    My sig Sucks!
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by gregor42 (Parson) on Oct 18, 2006 at 15:33 UTC
    • Idiomatic Regular Expressions. (Yes they have regex in lots of other languages - it's the familiarity of the perl implementation that I'd miss most.)
    • One Liners
    • Golf!


    Wait! This isn't a Parachute, this is a Backpack!
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by ruoso (Curate) on Oct 18, 2006 at 18:22 UTC

    More importantly than anonymous subroutines, what I miss more when working on some other languages is native closure support.

    daniel
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by exussum0 (Vicar) on Oct 18, 2006 at 21:35 UTC
    Here docs, so I can create multi line variables in a more braindead way. I know I can use qq, but I just like how I do 'cause it makes me happy :)
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by swampyankee (Parson) on Oct 18, 2006 at 22:26 UTC

    I've got to vote for the missing "hashes" and the equally missing regex (what do you mean I can't vote twice? This is America...oh, never mind).

    Heredocs are also nice. Some of the other listed features are not unique to Perl (I'm thinking array slices). qw is nice (it reduces wear on the quote key on the keyboard).

    emc

    At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

    —Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
      Hashes would be my vote, too.
      And the die/warn pair. Something so simple, so small, and so handy.
      -R
      -Reality might not get out of Beta today. (O.Timas, "Bot")

      Some of the other listed features are not unique to Perl

      Few if any are. In fact, the three you say you'd miss the most aren't unique to Perl.

      Perl is great because is has them all (and much more, of course) and because they are easy to use.

        I've used awk, which does have hashes and regex. sed has regex, but I'm not sure I'd call it a "language". I know there are others with both features (VBS, JavaScript, Java...) and I could write libraries to replicate either.

        Leaving out Perl's formats -- I tend to think the format statement in Perl is pretty lame (I find printf much more useful. imho, Perl's format compares quite unfavorably with Fortran's format) -- I really would miss most of the features in the poll; I've just used hashes and regex more often than any of the other features, so I would miss them more.

        emc

        At that time [1909] the chief engineer was almost always the chief test pilot as well. That had the fortunate result of eliminating poor engineering early in aviation.

        —Igor Sikorsky, reported in AOPA Pilot magazine February 2003.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by greatshots (Pilgrim) on Oct 19, 2006 at 04:39 UTC
    feauture perl
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by wolfger (Deacon) on Oct 19, 2006 at 14:48 UTC

    If I was forced to program in another language, the thing I'd miss the most would be.... Free will, and the ability to choose the best language for the task at hand.

      ++!

      Well spoken, sir!

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by blue_cowdawg (Prior) on Oct 19, 2006 at 17:20 UTC

    Huh... none of my favorites are on the list!

    • regular expression engine, including qr
    • map { }
    • something() if condition;
    • stmt foreach loop expr;
    • die(), carp(), warn() end friends
    • lazy typing
    • some of the assorted perlvars
    And those are just the things I've used today!


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by lyklev (Pilgrim) on Oct 19, 2006 at 21:08 UTC
    What I would miss most is the "There is more than one way to do it" concept. To me, writing Perl is like writing poetry, while writing C, Java or Fortran feels like writing a phone book.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by valavanp (Curate) on Oct 20, 2006 at 08:53 UTC
    I like REGEX the most powerful tool of PERL which is not in the list. I voted to anonymous subroutines, which is also an important feature in PERL.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by rbi (Monk) on Oct 20, 2006 at 09:48 UTC
    Fortran is the language I have always been using most. Should I go back to use Fortran only (sounds like jumping into the time machine and go back to the Middle Ages) I'd miss the whole little Perl I know, so many things made natural, easy and quick... probably I'd miss hashes most. And the Perlmonks resource :)
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by nicholasrperez (Monk) on Oct 20, 2006 at 12:16 UTC
    I think the biggest thing I miss the most when developing in other languages is the lack of built-in complex data structures. Want a hash? Instantiate a new one from the class library (which isn't always obvious since the names are different). Try a simple HoAoH or something equally trivial for Perl in a language like C#. You'll be casting yourself to death just to get one of the bottom children elements. Think C# 2.0 will help you? Sure, you rid yourself of the headache of casting, but you have silly looking things like
    Dictionary<string,List<Dictionary<string, MyObject>>> HoAoH = new Dict +ionary<string,List<Dictionary<string, MyObject>>>();
    How many angle brackets do YOU see? I think people take built-in complex data structures for granted more than any other feature in Perl
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by gustavderdrache (Acolyte) on Oct 22, 2006 at 03:24 UTC

    I'd miss the anonymous subroutines more than anything. Shoot, even when I'm using other languages that have them, I've only felt that Perl got 'em right. I'm lazy, I don't want to spell out "function" all the time.

    The pseudo-random mixing and matching of arbitrarily nested data structures are an amazingly close second. Complex data is organized for you! You don't have to clean up or allocate them, or make about a bajillion typedefs t use them effectively!

    "If you go on with this nuclear arms race, all you are going to do is make the rubble bounce" -- Winston Churchill
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by ailivac (Sexton) on Oct 22, 2006 at 05:14 UTC

    Perl's way of creating and using data structures is one of my most favorite features. Once you learn the basics or arrays, hashes, and references, you can string them together to make any arbitrarily deep structure using very terse syntax. Writing in Java for school projects over the last 2 years, I spent most of my time reading through documentation about the myriad collection classes, some new and some leftover from older API revisions, catching exceptions that I knew would never get thrown anyway, and figuring out how many sets of parentheses I neede to use to typecast the result of a method call, instead of doing actual work. Perl usually stays out of your way and lets you concentrate more on important work rather than little technicalities. That also means that it can take a long time to learn how to do it right, and if you don't know what you're doing Perl will easily break and give you lots of weird errors (although I have to say C++ takes the cryptic-error cake). However, now that I've gotten to know Perl, as well as several other languages, Perl code is definitely quicker to write than anything else.

      Definitely the ease to create and modify data structures using hashes, lists, etc - especially using [], {} and such.
      What, Java? Use XML? No, not for this task, thank you! And go back to sit in your corner, please.
      What, C++? Roll my own solution? Are you nuts? Go back to playing with your toys - STL and Boost are missing you.

      -- ank

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by poqui (Deacon) on Oct 23, 2006 at 21:12 UTC
    hmmm. I chose variable intepolation because regexen was not a choice. It were regexen that dropve me to perl in the first place.
Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by belg4mit (Prior) on Oct 23, 2006 at 22:15 UTC
    Intially I'd also say map or grep but I think -n|p and especially -pi~ is right up there.

    --
    In Bob We Trust, All Others Bring Data.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by Qiang (Friar) on Oct 24, 2006 at 14:16 UTC
    nice poll!

    i somehow think that i like Perl because it fits my personality. I like flexible and i like the power that Perl gives me( map, grep, do something if, complex datastructure). I couldn't imagine that I live in the java land.

    to me, writing Perl is like speaking in Chinese which is my first language, i feel FREE.

Re: If I was forced to program in another language, the Perl language feature I would miss most would be:
by Skeeve (Vicar) on Oct 24, 2006 at 15:02 UTC
    Regular Expressions!

    s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
    +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

View List Of Past Polls


Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-07-28 13:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (199 votes), past polls