Hacker News new | ask | show | jobs
by agentultra 4671 days ago
Another very interesting talk. He always gets me thinking even if I don't always agree with everything he says.

I don't think programming languages should be like instruments. I find it awkward working in Haskell or Clojure because I'm a composer and not a performer. I might be writing a rock opera one day and some chamber music the next. As a composer it seems completely wrong that I should contort my expression of my music to fit the characteristics of a single instrument. I can't bring an oboe to a metal show.

The computer itself is the instrument... one capable of becoming any instrument I program it to be. One that can be programmed to generate instruments and arrange them into symphonies.

The notation we use for describing music is, in my opinion, what programming languages should be like. If what I'm trying to do is write a symphony there is a common language and notation that everyone understands. A symphony isn't written alone by a composer in a room (despite what Danny Elfman would have us believe). They're generally written by a team of people doing transpositions, arrangements, and the like. If each part is written in its own notation/language then it becomes very difficult to see the whole piece as a single composition when it's finished. And it's much more difficult to compose such a large work and turn it into something we can execute and perform.

And that's where we are today in a number of domains such as web development and other distributed systems. We have these monstrous systems that are supposed to work in harmony but the notations used to describe them are so specialized and disparate that no one person can understand the whole piece. We have bits of systems written in C, others written in a handful of scripting languages, and run-times all over the place performing redundant work and wasting resources. It's a time-consuming and expensive process developing these systems because few of our "instruments," work together.

(and the problem, I believe, is deepening as we continue to develop systems-level programming languages whose ABI's come with the baggage of run-time processes)

I don't think programming languages, environments, and tools need be reduced to single-purpose instruments. I think we need languages more like Lisp and the symbolic model of computation where we can describe our processes using a notation and form more akin to rhetoric and logic that is much closer to our intent and purpose. We need the implementation of those languages to take those programs and turn our general-purpose computers, the real instruments, into virtual machines capable of executing those processes just as we describe them.

2 comments

Amusingly, this may be the best response I have to your comment: http://www.infoq.com/presentations/music-functional-language
I've used and jammed on several live-programming environments for sound in Common Lisp and scheme over the years. I like the style of language particularly for those reasons because you can reach a point where you're not programming functions that operate on primitive data structures anymore (although that is what is ultimately executed); you begin to develop a language that makes sense for describing musical processes. And that's just easier to reason about.

Nice link! :)

Programming languages are far more than notation. Notation is just syntax, and syntax is not that important. The syntax has to be readable and pleasant and unambiguous but that is it--nothing more, nothing less.

But programming languages go well beyond this: a programming language is a combination of syntax with semantics. And semantics, by far, is the most important part!

In your musical analogy, syntax would be the notation and semantics would be music theory or composition--the music itself. Semantics pervades everything: it controls what you can express, how you can express it and even how you think about it. All this is very much a function of the programming language more than any other tool or component in a software system.

The computer is the instrument, but the instrument is just an implementation detail. It's what we use to produce the music, but it's the music itself that we create.

As you said, you are a composer not a musician: so which part, then, is important?