You can edit almost every page by Creating an account. Otherwise, see the FAQ.

There's more than one way to do it

From EverybodyWiki Bios & Wiki

There's more than one way to do it (TMTOWTDI or TIMTOWTDI, pronounced Tim Toady) is a Perl programming motto. The language was designed with this idea in mind, in that it “doesn't try to tell the programmer how to program.” As proponents of this motto argue, this philosophy makes it easy to write concise statements like

print if 1..3 || /match/

or the more traditional

if (1..3 or /match/) { print }

or even the more verbose:

use English;
if ($INPUT_LINE_NUMBER >= 1 and $INPUT_LINE_NUMBER <= 3 or $ARG =~ m/match/) {
    print $ARG;
}

This motto has been very much discussed in the Perl community, and eventually extended to There’s more than one way to do it, but sometimes consistency is not a bad thing either (TIMTOWTDIBSCINABTE, pronounced Tim Toady Bicarbonate).[1]

In contrast, part of the Zen of Python is, "There should be one— and preferably only one —obvious way to do it."[2]

See also[edit]

References[edit]

  1. Wang, John (2009-01-24). "Can EPO (or TPF) tame TIMTOWTDI?". Dev411 Blog. Archived from the original on 28 July 2012. Retrieved 2019-07-15.
  2. "PEP 20 -- the Zen of Python".

External links[edit]


This article "There's more than one way to do it" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:There's more than one way to do it. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.