[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ripple: A Folding Editor



Hi All,

Discussion on the list has turned to folding editors - which reminds me to do something long overdue:

Announcing Ripple: A Folding Text Editor!

Something I developed a year or so ago and never really finished. I wont rant on because it's all on the web page:

	http://www.cs.ukc.ac.uk/people/rpg/tsl2/ripple/

I think students that dislike folding, actually dislike origami - "you mean I have to learn another way to do cut and paste?". Since the Mac, ctrl+x/c/v works in every program - kind of nice. Ripple tries to work as much as possible like a 'standard' editor (in the mac/windows/motif/etc sense).

While I'm here, I may as well give my two pence on syntax.

Most importantly: Does it matter?!
I don't like C syntax too much but I'll probably use it in my work for PR purposes. Everyone has there own taste usually dictated by background / familiarity. I put my '{' on the same line - so there!

Clean and clear vs. "while (dest++ = src++);" (string copy)
What matters is that the code is easy to read, sometimes short code is better, sometimes long code is better. Those that get it right, do so because they are skilled at what they do, those that don't, aren't. There are far far more poor programmers around than good ones! If you think you can enforce readable code the same way you enforce type safety, then think again.

UPPER CASE KEYWORDS
Like I said it doesn't matter but I don't like upper case. It's got nothing to do with taking me back to infant school (or to basic), I just find it ugly. You wouldn't use it in prose would you? Personally, I have never understood this idea that keywords need to be easily distinguished - if you can't remember what the language keywords are, there's not much point trying to read the code! I wonder if this discussion should degenerate into a juvenile flame war - just to honour the Internet tradition.

Indentation
I really like indentation as opposed to {}. I think people object to this in occam because there's too much of it. An idea I had is to allow the sub-process to occupy the same line as the parent when there is only one child. E.g.

	while true: seq
	  ..
	  ..
	  ..

	if
	  x = 1: out ! a
	  true:  out ! b

I'm not yet sure whether I like this or not - just thinking out loud.

Two Syntaxes.
I sincerely believe you would live to regret this. Do they still have Coke and Coke Classic in the US? A guy from Pepsi once said 'You can't even say Coke Is It anymore, you have to say Coke Are It". Haskell allows either meaningful layout or curly brackets and semi-colons - it' better than two alternate syntaxes but it still reeks of "design by committee" (I actually use both in the same program but I'm clearly misguided).

Over and out.

Tom.