Programming languages

From Wikiquote
(Redirected from Perl)
Jump to: navigation, search

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that specify the behavior of a machine, to express algorithms precisely, or as a mode of human communication.

Contents

Programming languages in general [edit]

  • Programs must be written for people to read, and only incidentally for machines to execute.
  • For twenty years programming languages have been steadily progressing toward their present condition of obesity; as a result, the study and invention of programming languages has lost much of its excitement. Instead, it is now the province of those who prefer to work with thick compendia of details rather than wrestle with new ideas. Discussions about programming languages often resemble medieval debates about the number of angels that can dance on the head of a pin instead of exciting contests between fundamentally differing concepts.
  • My original postulate, which I have been pursuing as a scientist all my life, is that one uses the criteria of correctness as a means of converging on a decent programming language design—one which doesn’t set traps for its users, and ones in which the different components of the program correspond clearly to different components of its specification, so you can reason compositionally about it. [...] The tools, including the compiler, have to be based on some theory of what it means to write a correct program.
  • Computer scientists have so far worked on developing powerful programming languages that make it possible to solve the technical problems of computation. Little effort has gone toward devising the languages of interaction.
  • If someone claims to have the perfect programming language, he is either a fool or a salesman or both.

Specific programming languages [edit]

Ada [edit]

  • When Roman engineers built a bridge, they had to stand under it while the first legion marched across. If programmers today worked under similar ground rules, they might well find themselves getting much more interested in Ada!

ALGOL [edit]

  • There is an appreciated substance to the phrase "ALGOL-like" which is often used in arguments about programming, languages and computation. ALGOL appears to be a durable model, and even flourishes under surgery — be it explorative, plastic, or amputative.

APL [edit]

  • The initial motive for developing APL was to provide a tool for writing and teaching. Although APL has been exploited mostly in commercial programming, I continue to believe that its most important use remains to be exploited: as a simple, precise, executable notation for the teaching of a wide range of subjects.
  • APL is a write only language.
    • *Anonymous, widely repeated remark

BASIC [edit]

  • It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
  • The teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery.
    • Edsger W. Dijkstra, "The Threats to Computing Science", ACM 1984 South Central Regional Conference, November 16–18, Austin, Texas. EWD898
  • Basic happened to be on a GE timesharing system that was done by Dartmouth, and when GE decided to franchise that, it started spreading Basic around just because it was there, not because it had any intrinsic merits whatsoever.

C/C++ [edit]

  • "Tsk, tsk," said the Hatter, "what a mess you've made."

    "It is perfectly fine," replied Alice calmly. "I will leave it for the garbage collection service to recover."

    "Don't expect any garbage collection here. Furthermore, your polymorphic variables won't ever be properly deleted, because you haven't declared your destructor to be virtual."

    "My what to be what?" said Alice, starting to get worried.

    "Declare your destructor. You must have a destructor. Everything that is constructed should be destroyed; it's only natural. Furthermore, if you are ever not quite what you seem, you should declare yourself to be virtual."

    "A rule to remember!" roared the Red Queen. "Never make a mess without cleaning it up first."

    "You can ignore her," whispered the Dormouse, picking up the tea cake Alice had just set aside, "but you shouldn't cast away const so lightly."

    Alice began to feel that this new world she found herself in was not quite the same as the cozy sitting room she had just left.

    • Timothy Budd (C++ for Java Programmers)
  • …one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
  • I invented the term Object-Oriented, and I can tell you I did not have C++ in mind.
  • C gives the programmer what the programmer wants; few restrictions, few complaints . . . C++ maintains the original spirit of C, that the programmer not the language is in charge.
  • The evolution of languages: FORTRAN is a non-typed language. C is a weakly typed language. Ada is a strongly typed language. C++ is a strongly hyped language.
  • Within C++, there is a much smaller and cleaner language struggling to get out.
  • The major cause of complaints is C++ undoubted success. As someone remarked: There are only two kinds of programming languages: those people always bitch about and those nobody uses.
  • C provides a programmer with more than enough rope to hang himself. C++ provides a firing squad, blindfold and last cigarette.

COBOL [edit]

  • Cheatham's amendment of Conway's Law: If a group of N persons implements a [COBOL] compiler, there will be N-1 passes. Someone in the group has to be the manager.

Fortran [edit]

Main article: Fortran

Haskell [edit]

  • A parser for things
    Is a function from strings
    To lists of pairs
    Of things and strings
    • Graham Hutton[1]
  • Think of a monad as a spacesuit full of nuclear waste in the ocean next to a container of apples. Now, you can't put oranges in the space suite or the nuclear waste falls in the ocean, but the apples are carried around anyway, and you just take what you need.
  • Haskell is faster than C++, more concise than Perl, more regular than Python, more flexible than Ruby, more typeful than C#, more robust than Java, and has absolutely nothing in common with PHP.

Java [edit]

  • The memory allocation strategy of Java can be described in 3 words. Nom nom nom.
    • Chainsaw, [2]

Lisp [edit]

Pascal [edit]

Perl [edit]

  • I have a pretty major problem with a language where one of the most common variables has the name $_
  • If I were chained to a bench and 'perl' was the only thing that could open the lock, I'd probably cut my hand off.
  • Perl is designed to give you several ways to do anything, so consider picking the most readable one.
  • Doing linear scans over an associative array is like trying to club someone to death with a loaded Uzi.
  • A Perl script is "correct" if it gets the job done before your boss fires you.
  • The camel has evolved to be relatively self-sufficient. (On the other hand, the camel has not evolved to smell good. Neither has Perl.)

PL/I [edit]

  • At first I hoped that such a technically unsound project would collapse but I soon realized it was doomed to success. Almost anything in software can be implemented, sold, and even used given enough determination. There is nothing a mere scientist can say that will stand against the flood of a hundred million dollars.

Python [edit]

Main article: Python

sed [edit]

  • Some people, when confronted with a problem, think "I know, I'll use sed." Now they have two problems.

Smalltalk [edit]

  • Smalltalk is dangerous. It is a drug. My advice to you would be don’t try it; it could ruin your life. Once you take the time to learn it (to REALLY learn it) you will see that there is nothing out there (yet) to touch it. Of course, like all drugs, how dangerous it is depends on your character. It may be that once you’ve got to this stage you’ll find it difficult (if not impossible) to “go back” to other languages and, if you are forced to, you might become an embittered character constantly muttering acerbic comments under your breath. Who knows, you may even have to quit the software industry altogether because nothing else lives up to your new expectations.

See also [edit]

References [edit]

  1. Programming in Haskell
  2. Perl Internationalization and Haskell: An Interview with Autrijus Tang

External links [edit]

Wikipedia
Wikipedia has an article about: