A Lisp that's nice to use?

tung's picture

Common Lisp is frozen at its core. Scheme is too theoretical. Arc, the 100-year language, I'm sure will be useful in 100 years. What's a Lisp programmer to do?

We don't need a thinker! We need a doer! Someone who will act without considering the consequences! -- Homer Simpson

I want to make my own Lisp, with one requirement: it should be nice to use.

Nice to install - Across platforms. Not just the language compiler/interpreter either, but modules too. Not sure it should be anything more than putting folders of source files in the right places.

Nice to write - Long names suck. Short names mean you spend less time tapping keys, and more time expressing.

Nice to work with - Infix math is natural, prefix math is for jerks. Why not allow this in Lisp?

(set x [[# (screen.width - ship.width) / 2]])

The double square brackets are for a special processing "list", and the first element is the tag to represent what sort should go on (# is short for "number".)

Prefix can still be done the "traditional" way, in case you need to build such expressions, but it's nice to do it the way we were taught in school.

Perl is mostly an ugly language, but I admire the way it promoted strings to first-class status. Why not have the same deal with regular expressions?

(set matches ([[$ ^(\w+)\s+(\d+),?\s*(\d{4})$]] "July 31, 1986"))
(print (matches 0) (matches 1) (matches 2) (matches 3))

$ for string processing (S with a line through it).

Nice to read - Make too many names short, and you'll struggle to remember them all. Python strikes a nice balance: short, but not too short.

Nice to organise - The Lisp dialects I've come in contact with seem allergic to file-system awareness, either by history, or through actual fear that the file system model will vanish. Why not capitalise on files/folders while they're still around?

By splitting modules by files, and grouping them by folders, we have a nice solution that works most of the time. Plus it's transparent.

In main.lisp:

(require thing)
(include dude.stuff)

(thing.implode 1 2 3)
(burp)
(gulp 'loudly)
(jump 50)

In thing.lisp:

(def implode (a b c)
  (ohshi a b c))

In dude/stuff.lisp:

(def burp ()
  ...)

(def gulp (volume)
  ...)

(def jump (height)
  ...)

Nice to integrate - Make it in C. Arc is built on mzscheme, and it might move off it eventually, but C provides mobility. A good hook-in FFI for the language in C would be awesome, so it could be embedded in apps.

Nice modularised standard library - Something along the lines of "batteries included". Python rip-off, 'nuff said.

Nice to screw around with - Grabbing the source, building the thing, running the tests should be easy. No arcane requirements or strange invocation lines or anything. "Source" and "ready-to-roll" packages should be made available.

Sure, it won't last long beyond the file/folder system model, but damn if it wouldn't be sweet to use.