By Peter Bell

Questions on Language Design

If you ever have nothing better to do that write your own language from scratch (and I'm not talking simple declaritive API like DSLs here), this is a fascinating list of questions to consider.

Learning Lisp

As Eric Raymond said in his famous How to be a hacker essay:

"Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot."

If you're interested in "getting" Lisp here is an interesting attempt to describe it in terms of XML. Not a bad read.

If that piques your interest there is always Practical Common Lisp, a copy of which is sitting on my bookshelf unopened in New York awaiting a particularly long rainy weekend this fall . . .

Static Typing as Meaningless Bureaucracy?

I'm so glad that someone *else* posted this and a follow-up covering some of the comments made so I don't have to break out the flame retardant keyboard after posting something similar myself.

Of course, if you're not test infected yet, you might want to stick with Java . . .

Can We Give Fluent Programming a rest?

I like to make my APIs as readable as possible and I think that careful naming and the occasional bit of syntactic sugar is fine. If a designer wants to display a content area in my templating engine, they just say #Display.contentArea("Sidebar")# and it is done. Feedback from designers is that they find that comprehensible enough, yet a programmer would have no problems understanding that some kind of class called Display has been injected into my renderer and it has a contentArea() method that takes the name of a content area and renders it. I think that is fine.

I was just looking through a slide deck primarily about Language Oriented Programming (see my last article) and it included the following fluent snippet:

2.days.fromToday.at(4.pm)

I agree that it is an engineering marvel that they've managed to write a DSL in Ruby to parse what sounds like an English statement (I hope it wasn't on a paying customers dime!) and I'm sure that if you learnt the entire API you'd be able to do some cool things, but really, what percentage of your code is dealing with those kind of time intervals and how much time do you want to put into learning what is clearly a non-trivial API? I'd take a simpler API that is readable but not fluent.

As a recent posting mentioned (sorry - I didn't save the link), programs may be primarily for humans to read and only secondarily for computers to parse, but they don't need to be written in fluent English to be readable and it seems to me that fluent programming comes at the cost of discoverability and comprehensibility. Lets say the above statement was off by an hour, exactly where in the code base would I go to find the algorithm to fix the bug?

Thoughts?

Dynamic Language Support in .NET?

It looks like there is some buzz suggesting that Microsoft will announcing Dynamic Language support for .NET, providing some of the common dynamic language features like support for dynamic methods and arbitrary length integers.

This is the obvious next step in the distinction between languages (CF, Python, Ruby) and the platforms they run on (CLR and JVM). Of course we will continue to see stand alone deployments of languages, but it will be interesting to see over time if more people move to a Java or .net deployment runtime and then just run the appropriate port of their chosen language.

Obviously performance and library compatibility will be huge issues, but this is definitely a space to watch.

Thoughts?

Smalltalk in Flash?!

Still getting my head around this, but it appears that this is a Smalltalk editor that stores the syntax using lisp s-expressions and can show you the same syntax in either Lisp or Smalltalk. And the guy *seems* to have written a version of Lisp in AS which he then used to code the rest of this app.

Here is the architectural overview.

And I thought *I* was crazy. This is too cool :->

God and Lisp - The Ultimate Debate?

Did he or didn't he?

What do you think?!

An Introduction to metaprogramming

Just wanted to point out a very cool posting that is supposed to be talking about Symbols but actually gives a great little introduction to in-language metaprogramming. Most of this is stuff that we have to do using metadata and templates to write the data to files in ColdFusion, but it is always interesting to see what is possible in other languages so you can use the concepts in your own.

Note to self: added class_eval to ColdFusion wishlist :->

Is LISP really THAT Cool?!

After reading Paul Grahams excellent book (thoroughly recommended for a bunch of reasons) I have been primed to check out LISP, and I just came across an interesting article on another programmers path towards Lisp. I'm still trying to select my primary new language to learn for 2007 (excluding MXML, AS and JS) and currently it's a toss up between Ruby, Groovy, Python and something heavily Lisp influenced. Anyone have any experience with Lisp or any similar language?

From the way Graham tells it, Lisp is the language Ruby would like to be when it grows up (he argues that Lisp Macros are more powerful than Rubys metaprogramming capabilities).

Any opinions?!

Anyone Played with Groovy?

Just wondering if anyone has had a chance yet to play with Groovy (or Grails - its Rails inspired framework)? I noticed that it was just released as a 1.0 and while it doesn't have Mixins yet, it actually looks pretty cool.

Imagine most of the benefits (not all, but most) of Ruby or Python, with native support for Java objects and (most importantly) using Java influenced syntax so you don't have to "get" Ruby or Python syntax. Extremely concise, fairly powerful, and easy to integrate in a Java shop. It doesn't compete with CF directly, but it'll be interesting to see if it can take some wind out of Ruby's sails. With the number of Java developers out there looking to have a dynamic scripting alternative, it seems an interesting approach.

Of course, there is some argument to using Ruby or Python for scripting as you will soon be able to deploy both on Java and .NET frameworks (which seem to be the two default deployment options for most firms) and Groovy is young and immature, but it should be interesting to see what comes of this . . .

Here is a very old tutorial which is still a pretty good, simple introduction to the language.

Any input/ideas/opinions much appreciated!

BlogCFC was created by Raymond Camden. This blog is running version 5.005.