Can anyone enlighten me?
Can anyone enlighten me?
Shen is a portable functional programming language that offers
pattern matching,
lambda calculus consistency,
macros,
optional lazy evaluation,
static type checking,
an integrated fully functional Prolog,
and an inbuilt compiler-compiler.
Among other things, it's an attempt to create a Lisp that incorporates some of the things you find in functional languages like Haskell.Here's an essay, from an invited talk for the 2009 European Conference on Lisp, on the motivations to create Qi and then Shen: http://www.lambdassociates.org/blog/nextlisp(1).htm
Now if only the (cheap!) book on Shen was available as a DRM-free epub book.
As for the book, right now the work on the project by the author is supported by direct patronage or buying his books. And there's much more in the book than just "leaning Shen". Here's the web page for it: http://www.shenlanguage.org/learn-shen/TBoS/
Which includes the preface, table of contents, and conceptual dependency table, i.e. what previous chapters you need to have mastered to understand each chapter.
From the chapter titles and subtitles, here's stuff that goes substantially beyond "learning Shen":
Higher Order Functions (e.g. partial application and currying)
Non-determinism (non-deterministic algorithms)
Shen-YACC (sigh, needed for e.g. pattern matching)
Lambda Calculus
Writing Good Programs
Sequent Calculus
The SECD Machine
Shen Prolog (12 pages on Prolog per se)
The Compilation of the Sequent Calculus
And there's a lot of material on types (one of the features of Qi/Shen). So you get a whole lot of CS exposition in the context of Shen.However, it looks like it has a lot of interesting features that people might want to use. For example, it can be trivially embedded in pretty much any other language by implementing a handful of core functions. It has an embedded prolog DSL. It has pattern matching, static type checking, lazy evaluation.
If you wanted to use it commercially and safely, you'd have to spend quite a bit on an IP lawyer with no guarantee he'd give you an OK. In a universe with so many good languages, many with much bigger communities (in part because of the license), with well understood and often tested in court licences, it's a non-starter.
The intent is fine, everybody's code will run on your port, modulo bugs, and is plainly stated in the last line of the licence: “Thou shalt not break the spec” It's the execution by someone who's a computer scientist, not a lawyer, nor very familiar with IP law.
Yes, Lisp is the One True Way, but that doesn't mean it's the source of all good ideas in CS.
I would not know why I would write anything I have written in the past in Scheme or Lisp, in this language and would it give me as advantage. The basic application seems to be programming language research and education.
True, many programming languages have applications, but for this I don't know any...
Common Lisp has a lot of applications in possible areas, for example that are a dozen theorem provers from PVS (used by NASA for example) to ACL2 written in Lisp. I'm not aware of a system remotely similar in Shen (or Qi) that's used by people.
1. Qi/Shen are very young, less than 10 years old.
2. Their adoption has been crippled by wonky licenses.
That said, the sequent calculus can be viewed as an implementation detail, I don't believe it's integral to the use of Shen. There are arguments for adding features from non-Lisp functional languages, which I'll note in the forms of OCaml, F# and Haskell are seeing real world use.I'll come back to this question after learning Shen (the wonky license has kept me from more than dipping my toe into it).