Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!decwrl!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uxc.cso.uiuc.edu!uicsrd.csrd.uiuc.edu!mcdaniel From: mcdaniel@uicsrd.csrd.uiuc.edu Newsgroups: comp.sources.d Subject: Re: How are YOU using perl? Message-ID: <42400006@uicsrd.csrd.uiuc.edu> Date: 21 Apr 88 02:09:00 GMT References: <235@ateng.UUCP> Lines: 42 Nf-ID: #R:ateng.UUCP:235:uicsrd.csrd.uiuc.edu:42400006:000:1857 Nf-From: uicsrd.csrd.uiuc.edu!mcdaniel Apr 20 20:09:00 1988 Larry: thanks for your prompt reply. I recently tried to use perl for a large program. I chose perl rather than C because of perl's good string handling facilities and built-in list processing facilities. I rapidly discovered that, while perl is good for short programs (up to 100 lines or so?), trying to do longer programs, or more complicated ones, becomes painful. The most noticable: 1) there is no way to declare local names. To avoid name collisions in "sub"s I was prefixing names with the "sub" name, which lead to lines like for ($SWAP_i = 0; $SWAP_i < $#lru_buffers; $SWAP_i++) 2) If I make a typo in a variable name, I get no compiler- or run-time notice except for wrong answers. Icon has a partial solution: an option makes all new variables start with a special value, which causes a run-time error if used before setting. This gets many of the cases, but you can still sometimes use a typo-ed name on the LHS of an assignment without warning. Only declarations can catch those. For a short program, all the identifiers are there in front of you, and it's easier to see and avoid such problems. Furthermore, perl's typelessness (which I like) and lack of declarations help---you can get off the ground without all the overhead of typing (in either meaning of the word). But after 175 lines of perl, I decided that putting up with C (despite mucking about with and sscanf and malloc and pointers and . . .) was easier. However, I *will* use perl in shorter applications. -- Tim, the Bizarre and Oddly-Dressed Enchanter Center for Supercomputing Research and Development at the University of Illinois at Urbana-Champaign Internet, BITNET: mcdaniel@uicsrd.csrd.uiuc.edu UUCP: {ihnp4,uunet,convex}!uiucuxc!uicsrd!mcdaniel ARPANET: mcdaniel%uicsrd@uxc.cso.uiuc.edu CSNET: mcdaniel%uicsrd@uiuc.csnet