Skip to content
quotesby

About this quote

What does it mean?
Portability should be assumed as the default behavior.
In plain terms
Assume code should be portable by default.
What can you take from it?
Write code that works across platforms unless a reason not to.

Where it applies

  • library development
  • cross‑platform projects

Putting it to work

  • avoid platform‑specific APIs
  • test on multiple systems

Questions to consider

  • When is non‑portable code justified?
  • How does default portability affect performance?

Another view

Sometimes performance or features require platform‑specific code.

More from Larry Wall

  1. And other operators aren't so special syntactically, but weird in other ways, like 'scalar', and 'goto'.

    Permalink to quote #170
  2. If this were Ada, I suppose we'd just constant fold 1/0 into die 'Illegal division by zero

    Permalink to quote #172
  3. (Never thought I'd be telling Malcolm and Ilya the same thing... :-)

    Permalink to quote #169

Related quotes

  1. Portability is for people who cannot write new programs.

    Linus TorvaldsLinus Torvalds quote #16
  2. Besides, including <std_ice_cubes.h> is a fatal error on machines that don't have it yet. Bad language design, there... :-)

    Larry WallLarry Wall quote #29
  3. The way I see it, if you declare something portable, you'll always be wrong, and if you declare it non-portable, you'll always be right. :-)

    Larry WallLarry Wall quote #198