The Artima Developer Community
Sponsored Link

Python Buzz Forum
Orthogonality is Pretentious

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
Ian Bicking

Posts: 900
Nickname: ianb
Registered: Apr, 2003

Ian Bicking is a freelance programmer
Orthogonality is Pretentious Posted: Mar 13, 2006 3:36 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ian Bicking.
Original Post: Orthogonality is Pretentious
Feed Title: Ian Bicking
Feed URL: http://www.ianbicking.org/feeds/atom.xml
Feed Description: Thoughts on Python and Programming.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ian Bicking
Latest Posts From Ian Bicking

Orthogonality is a much-touted philosophy of language and system design. To boil it down: orthogonal design means that features multiply each other's utility, and overlap as little as possible. Given a set of carefully-crafted orthogonal features, you can enable a wide variety of possibilities through combining those features. In theory, this means that you can have a small and simple "core", which enables a rich environment. Languages at far end in this direction of design would be Smalltalk and Scheme.

This seems really nice, and everything seems comprehensible and simple. Except, if you actually work with Scheme code that does something useful, it's not particularly simple. In Smalltalk it is very common to encounter Ravioli Code, a kind of anti-spaghetti code that seems to be nearly as incomprehensible. Idealists of this direction of design end up with weird concepts like Paul Graham's 100 Year Language where he speculates on designing a language without built-in integers, because integers can be derived from simpler concepts. Only a mathematician would call that elegant, of course -- but even they are lying when they say that, for even the most fundamentalist mathematician does not use the Lambda Calculus when balancing their checkbook.

Orthogonal design allows unbound creativity. Anyone who tries to be creative knows that creativity without bounds is very hard to handle. Bondage is still worse, but constraints aren't all bad.

So, on the opposite side of the spectrum from the orthgonal languages are languages with non-multiplicative features -- features that are mutually exclusive, or linearly enumerable. Here lies PHP (which I started thinking about from this discussion).

And there are real benefits to that position! One example of this design in PHP is the lack of objects in the standard library. Instead it is one very long list of functions. If you want to do something with the standard library there either is a function for doing it, or there is not a function. If you want to see what you can do, you can just scan through the index.

This is literally what beginning programmers do (and mediocre experienced programmers). They read lists, and this is very productive for them. I'm not a beginner, but I still like lists too. You find what you want, or you don't; and if you do, you probably find an example close to what you want to do. Or you don't, and then you have to think and be creative, but for some software you don't really want to be creative, you just want to get shit done. PHP is all about getting your shit done. You go beyond that and PHP is not that satisfying. But man, when you are coding PHP you can practically fall asleep and your fingers will still be flying, banging out code -- it feels so productive. If you are a fast typist and you have a loud keyboard this is a very good way to impress your coworkers.

If you feel code is a liability you will not be so impressed by the large number of characters produced by a PHP programmer. Oh well. Because the PHP programmer -- particularly the beginner, but this can even apply to the advanced programmer -- feels very satisfied, there's lots of positive feedback. They are not using the values of pretentious software engineers.

So, that's why PHP is so popular. And it's entirely deserved. And Basic before it -- another language that seems so painful because of the lack of orthogonality, but that is both its curse and greatest feature.

The language that got me thinking along these lines wasn't actually PHP, but Django templates. I was looking at them, and they have no expressions, no boolean operators, nothing complex, nothing you can't process with a regular expression. And as a result if you look at the documentation you see an enumeration of everything you can do. Everything. That feels uncomfortably constraining to me. But to someone who doesn't program that would feel very comforting. And that's the whole point of that language; it wasn't written for me. And I guess PHP wasn't written for me either, but I already knew that anyway.

Read: Orthogonality is Pretentious


Topic: YCombinator name story Previous Topic   Next Topic Topic: Lisp in Python

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use