News for hackers. Stuff that matters.
Re:Lisp Hackers: Marijn Haverbeke by atdt on Tuesday April 03, 2012 @03:21AM (#3791904)
Dart takes an interesting hybrid approach, making static typing optional but enforcing it rigidly wherever it is declared. (I'm not sure it originated with Dart, but that's where I encountered it.) This allows you to prototype things quickly without having to fuss about types. Later, when you're satisfied you've got the right idea, you go back and add static typing wherever having the guarantees that it provides would be useful.

I haven't had the chance to try this out yet. I'm sure some people like the fact that their programming language won't put up with fast-and-loose code -- you probably don't want your workout buddy to agree too eagerly to your suggestion that you skip the gym and grab a milkshake instead. But I think it might work for me. I'd be interested to hear about people's experiences, at any rate.

Re:Lisp Hackers: Marijn Haverbeke by hkolek on Tuesday April 03, 2012 @09:01AM (#3792709)
The google closure compiler does this. You can optionally annotate your javascript functions with type information (JavaDoc style) and the compiler will enforce it. For example:

  /**
   * @param {Function} fn
   * @param {string|null|undefined} str
   */
  foo.bar = function(fn, str) {
      // do something
  }
It is pretty powerful, you can also do some generics-like stuff like "@param {Array.<string>}" to enforce an array with only strings as elements.
Re:Lisp Hackers: Marijn Haverbeke by cageface on Tuesday April 03, 2012 @04:01AM (#3791998)
I like this idea in theory at least. I think Dylan worked this way too.

It's kind of shame Dylan died out. It seems like it was ahead of its time in many ways.

Re:Lisp Hackers: Marijn Haverbeke by BruceM on Tuesday April 03, 2012 @05:54AM (#3792232)
Dylan does work in a similar way. One issue is that we don't go far enough yet, particularly with functions, so while you can specify a vector of integers, you can't (yet) specify a function that takes an integer parameter, just a function. We'd like to do something about that this year.
Re:Lisp Hackers: Marijn Haverbeke by beza1e1 on Tuesday April 03, 2012 @04:40AM (#3792092)
Recently, there is some activity to revive Dylan.

http://opendylan.org/

Re:Lisp Hackers: Marijn Haverbeke by BruceM on Tuesday April 03, 2012 @05:52AM (#3792228)
In fact, we're working towards a new release in the coming month or so. :)