4

Wikipedia defines software orthogonality as:

orthogonality in a programming language means that a relatively small set of primitive constructs can be combined in a relatively small number of ways to build the control and data structures of the language. The term is most-frequently used regarding assembly instruction sets, as orthogonal instruction set.

Jason Coffin has defined software orthogonality as

Highly cohesive components that are loosely coupled to each other produce an orthogonal system.

C.Ross has defined software orthogonality as:

the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa.

Now there is a hypothesis published in the the ACM Queue by Tim Bray - that some have called the Bánffy Bray Type System Criteria - which he summarises as:

  1. Static typings attractiveness is a direct function (and dynamic typings an inverse function) of API surface size.
  2. Dynamic typings attractiveness is a direct function (and static typings an inverse function) of unit testing workability.

Now Stuart Halloway has reformulated Banfy Bray as:

the more your APIs exceed orthogonality, the better you will like static typing

My question is: What is the evidence that an API has exceeded its orthogonality in the context of types?


Clarification Tim Bray introduces the idea of orthogonality and APIs. Where you have one API and it is mainly dealing with Strings (ie a web server serving requests and responses), then a uni-typed language (python, ruby) is 'aligned' to that API - because the the type system of these languages isn't sophisticated, but it doesn't matter since you're dealing with Strings anyway.

He then moves on to Android programming, which has a whole bunch of sensor APIs, which are all 'different' to the web server API that he was working on previously. Because you're not just dealing with Strings, but with different types, the API is non-orthogonal.

Tim's point is that there is a empirical relationship between your 'liking' of types and the API you're programming against. (ie a subjective point is actually objective depending on your context).

  • 4
    You are going to have to clarify. I study type systems and even then am not entirely clear on what you're asking. Orthogonality isn't a line to exceed, it's a sliding scale. And "context of types" could mean quite a bit in relation to API design. And it's not clear what your aim is. A completely orthogonal API is usually an API that is doing too many unrelated things – Telastyn May 30 '14 at 23:52
  • Static typings attractiveness is a direct function (and dynamic typings an inverse function) of API surface size. Does this mean that the ultimate solution is a dumb terminal that just sends one text file to a server and lets the server unpack it dynamically and do all the work? – Vector May 31 '14 at 0:19
2

What is the evidence that an API has exceeded its orthogonality in the context of types?

Literally speaking, any API that allows you to do some task in more than one way is not entirely orthogonal.

Given that there is no formal measure of orthogonality apart from the binary one above, the only meaning for "exceeded its orthogonality" is "not entirely orthogonal".

Thus the "evidence" you are asking for is some task (any task) that can be done more than one way.

Which is not useful ...


The "source" you are asking us to interpret for is a tweet. I don't think it is a worthwhile activity to read great depth of meaning into it. In this case, I doubt that deep meaning is intended. Certainly not the kind of meaning you are trying to read into it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.