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

Re: A few questions about Dylan.



Thaddeus L. Olczyk <olczyk@interaccess.com> wrote:
> Lately I've been going around looking at various scripting languages
> trying to find one to suit my purposes.
> I've stumbled across Dylan and have a few questions about it.
> 
> 1) Is Dylan a good "scripting language"?

Yes, with caveats. 

As a language, Dylan is higher-level than Python, and a little
lower-level than Common Lisp. It has clean support for both the OO and
functional programming styles, so you can write terse programs when
you need to -- eg:

let new = map(as-uppercase, choose(method(s) s[0] = '%' end, strings));

which might look like

  new = make(<stretchy-vector>);
  for (s in strings)
    if (s[0] = 'c')
      new := add!(new, as-uppercase(s))
    end if;
  end for;

in a more procedural-OO style. 

will take every element of strings that begins with '%', uppercase
it, and bind the new collection to new. Dylan also has the nice
feature that you can write purely dynamically typed programs, and then
add things like type declarations to strategic points when you need to
speed it up.

Now, for tool support:

If you are on Windows, then you can't go wrong with the commercial
Functional Developer environment. It is very robust, has a rich set of
tools and libraries, and there is a free trial version so you can get
to learn Dylan with it. However, it has not yet been ported to any
Mac/Unices yet.

The Gwydion Dylan open-source implementation is much rougher -- think
late alpha/early beta level of completeness. The infrastructure is
mostly complete, but there are gaps in documentation and a lot of
libraries are quite rough. IMO, if you want to write free software
this is a good point to join, because most of the basic infrastructure
work is done but there are still a lot of important contributions to
be made.

> 2) What is the learning curve.
> I used to use lisp, so it might be shortened.

If you know CLOS, then the learning curve is probably close to
nonexistent -- you can learn Dylan as fast as you can pick up the
syntax. Otherwise, if you know Scheme or C++/Java then the learning
curve is a couple of hours to couple of days.

This is leaving aside the macro system, which might take days if you
know Scheme's, and maybe a week or two to grok if all you know is cpp.
However, you can write Dylan code without having to use lots of macros
immediately.

> 3) Is there an emacs mode for Dylan.

A rather over-engineered dylan-mode is available with the Gwydion
Dylan distribution.

> 4) I intend to release some of the programs I write under an open
> source/GPL license, aside from releasing the source code ( which does
> no good to someone who does not have the compiler ), how hard is it to
> *legally* distribute precompiled binaries ( keep in mind, I'm giving
> this stuff away I don't keep track of who uses it or buy runtime
> licenses ).

Pretty easy. The Gwydion Dylan project is mostly under an BSD-style
license (do as thou wilt as long you don't sue me, and give credit)
and I don't believe there are distribution restrictions on the
programs compiled with the Functional Developer environment.


Neel



References: