Re: [livecode] non-linguistic programming

From: alex <alex_at_lurk.org>
Date: Thu, 03 Jan 2008 15:54:03 +0000

On Thu, 2008-01-03 at 15:49 +0100, douglas edric stanley wrote:
> For me a novel is not just a list of characters.

What else is it then? To me, on the surface, it is a list of
characters. The paper and typography are minor details, setting the
scene for the list of characters. The novel itself may non-linear and
multi dimensional, but is represented as a list of linear characters.

Of course the novel is far more than the component list of characters,
but on the surface level, that's all it is. The same with a computer
program. So what?

> But just because a novel can be
> represented inside of a computer through an
> array, and a picture can be represented inside of
> a computer through an array, this does not mean
> that novels and pictures are nothing more than
> strung-together tokens.

You've still lost me. A computer program, and a novel can be
represented by a list of tokens. They are more than that. To me, that
means that the surface representation of something as a list of tokens
is not a limiting factor.

> for(char*i="Hello"; *i!='\0'; ++i) std::cout << *i << std::endl;
>
> I'm sorry to offend all the robots out there, but
> that's totally unreadable unless you understand
> the underlying architecture of the computer.

C is a particularly leaky abstraction, but this appears to be a straw
man argument, because C is an intentionally low level programming
language.

> You
> have to understand memory addresses and pointers
> and loops and streams, etc. This is not writing,
> has nothing to do with literature, etc. This is
> more like knitting. So my real question is: if we
> are already kitting, why not just knit?

I enjoy knitting very much, when I get the time. I attended an outdoor
"origins of programming" workshop in the summer where we sat and knitted
hats.

But what is wrong with knitting with text as well?

> Which returns me to the question of beauty. I'm
> sorry, but code is ugly.

C++ code is ugly. Knitting with knotted barbed wire is ugly too,
particularly without gloves. I don't see why knitting with symbols is
intrinsically ugly if knitting with wool is beautiful.

In functional programming we don't have arrays, we have lists, which are
quite a different kettle of fish.

> Haskell is still pretty unreadable, therefore a
> bit of a kludge. But at least it looks unreadable
> from the get-go and doesn't pretend otherwise.

What's unreadable about it? I find its syntax remarkably clear and
concise.

> But you have to be a computer scientist to read
> it, whereas I'm going in the other direction.

I don't think of myself as a computer scientist, and I can read it. As
Dave says, new programmers seem to find learning functional languages
(in his case Scheme) just as easy if not easier than imperative ones.
It's only imperative programmers who find it harder to learn a
functional language than another imperative one, because they're used to
languages being largely the same under the hood.

> Anyone can learn to play puzzles and knit, so I
> think that's a far richer direction to explore.

"Playing puzzles and knitting" seems a good description of programming, to me.

alex
Received on Thu Jan 03 2008 - 15:56:58 GMT

This archive was generated by hypermail 2.4.0 : Sun Aug 20 2023 - 16:02:23 BST