Re: Market Penetration of FP and Haskell

1999-03-04 Thread Philip Wadler

"S. Alexander Jacobson" <[EMAIL PROTECTED]> writes:

> So, if they are making sure that all platforms have a scheme interpreter,
> why not make the spec language agnostic.  i.e. allow the user to use any
> language that can be compiled/translated into scheme (by code written in
> scheme?).

Your assumption is incorrect.  There is no Scheme interpreter in XSL.

I should have been clearer in my earlier comment: XSL is a special
purpose language with a highly specialised structure (as Alexander
notes, it is a little like production rules).  It is not as general as
either Haskell or Scheme.  DSSSL, unlike XSL, was embedded in Scheme
and provided both the specialised structure and general-purpose Scheme
computation.  I'd be very happy if XSL was as nice as Scheme!

> So the user would be able to say:
> http://www.haskell.org/haskell2scheme>
> 

There is an extension mechanism in XSL to allow part of the transformation
to be done in another language, roughly similar to the above.

-- P






Re: Market Penetration of FP and Haskell

1999-03-03 Thread S. Alexander Jacobson

On Tue, 2 Mar 1999, Philip Wadler wrote:
> Bad news: The proposal to split XSL refers to the current working
> draft, which already contains a transformation language (Section 2)
> and a style language (Section 3).  Preliminary versions of the
> transformation language are already in wide use (including Internet
> Explorer 5 by Microsoft; LotusXSL by IBM Alphaworks; and xt, by James
> Clark, editor of the XSL document).  So it's way too late, there is no
> chance of getting the W3C to switch to Haskell.
> 
> Good news: The charter requires that XSL be `a declarative language',
> and in fact the transformation part of XSL is a functional language.
> It is largely based on DSSSL, the stylesheet language for SGML, an ISO
> standard based on Scheme.  (I was gobsmacked when I first discovered
> Scheme was part of an ISO standard for document production!)
> 
> Bad news: XSL is not nearly as nice as Haskell.  Sigh.

So, if they are making sure that all platforms have a scheme interpreter,
why not make the spec language agnostic.  i.e. allow the user to use any
language that can be compiled/translated into scheme (by code written in
scheme?).
So the user would be able to say:
http://www.haskell.org/haskell2scheme>


The question for the compiler/interpreter writers here is
1. how hard would it be to write code that translates haskell into scheme?
2. would this translator be excessively slow?
3. would the resulting scheme be excesively slow/large?

If the answer to these questions is (easy, no, no), then this minor change
would dramatically increase the language options for the whole web
community.

If the answer to these questions are hard,slow,slow and/or large, then is
there a well defined VM which declarative languages like scheme,
haskell, prolog &tc. can target?  For example, why not use a JVM that
allows tail-call recursion, as the target machine? or the Ocaml VM?  

Such a generic language system would benefit more than just the haskell
(or declarative programming community).  I would guess that translator
writers could define declarative subsets of C, Java, Perl, TCL, etc.

It also seems like XSL sort of resembles a production system so languages
like Clips/Jess might be better suited to process an XML stream (for
some applications) than any of the functional programming langues.

In any case, wedding everybody to one language seems like a mistake.
(e.g. Java)

> PS.  If anyone has any suggestions about *small and reasonable* changes
> to the XSL working draft that would be an improvement, please let me know.


I guess that is the question.  I don't know enough about language design
to answer.  Are the above suggestions *small and reasonable*?  

-Alex-
 
> XSL working draft: http://www.w3.org/TR/WD-xsl
> XSL W3C home page: http://www.w3.org/Style/XSL/
> 
> ---
> Philip Wadler [EMAIL PROTECTED]
> Bell Labs, Lucent Technologies  http://www.cs.bell-labs.com/~wadler
> 600 Mountain Ave, room 2T-402   office: +1 908 582 4004
> Murray Hill, NJ 07974-0636 fax: +1 908 582 5857
> USA   home: +1 908 626 9252
> ---
> 

___
S. Alexander Jacobson   Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop








Re: Market Penetration of FP and Haskell

1999-03-02 Thread Philip Wadler

"S. Alexander Jacobson" <[EMAIL PROTECTED]> writes:

> There is a campaign going on to separate XSL (eXtensible style
> language) into two separate languages
> 1. a transformation language
> 2. a style language
> 
> I suggest that now is the opportunity to make a convincing case that the
> transformational language should be a functional programming language.
> HoF, Laziness and statelessness are ideal properties for such a language.
> The existing XSL spec was somewhat influenced by scheme, but a
> transformational language has stronger consistency requirements and should
> be typechecked so Haskell seems like a good choice.

I have bad news, good news, bad news, and good news.

Bad news: The proposal to split XSL refers to the current working
draft, which already contains a transformation language (Section 2)
and a style language (Section 3).  Preliminary versions of the
transformation language are already in wide use (including Internet
Explorer 5 by Microsoft; LotusXSL by IBM Alphaworks; and xt, by James
Clark, editor of the XSL document).  So it's way too late, there is no
chance of getting the W3C to switch to Haskell.

Good news: The charter requires that XSL be `a declarative language',
and in fact the transformation part of XSL is a functional language.
It is largely based on DSSSL, the stylesheet language for SGML, an ISO
standard based on Scheme.  (I was gobsmacked when I first discovered
Scheme was part of an ISO standard for document production!)

Bad news: XSL is not nearly as nice as Haskell.  Sigh.

Good news: Malcolm Wallace and Colin Runciman at York are working
on a Haskell library for manipulating XML.  If the transformation and
style languages are separated (which seems likely to happen), then that
will make it easier for users to substitute Haskell for the transformation
part of XSL, if they choose.

-- Phil Wadler (member of the XSL working group)

PS.  If anyone has any suggestions about *small and reasonable* changes
to the XSL working draft that would be an improvement, please let me know.

XSL working draft: http://www.w3.org/TR/WD-xsl
XSL W3C home page: http://www.w3.org/Style/XSL/

---
Philip Wadler [EMAIL PROTECTED]
Bell Labs, Lucent Technologies  http://www.cs.bell-labs.com/~wadler
600 Mountain Ave, room 2T-402   office: +1 908 582 4004
Murray Hill, NJ 07974-0636 fax: +1 908 582 5857
USA   home: +1 908 626 9252
---






Market Penetration of FP and Haskell

1999-03-02 Thread S. Alexander Jacobson

There is a campaign going on to separate XSL (eXtensible style
language) into two separate languages
1. a transformation language
2. a style language

I suggest that now is the opportunity to make a convincing case that the
transformational language should be a functional programming language.
HoF, Laziness and statelessness are ideal properties for such a language.
The existing XSL spec was somewhat influenced by scheme, but a
transformational language has stronger consistency requirements and should
be typechecked so Haskell seems like a good choice.

The proposal is at http://www.prescod.net/xsl/petition/
Current Comments are at http://www.prescod.net/xsl/petition/comments.html

Here is an opportunity to bring FP to the masses. I suggest that people
here interested in having Haskell (or some FP) built into their web
servers and web browsers at very least go read what is posted so far and
become active in this process.

-Alex-


___
S. Alexander Jacobson   Shop.Com
1-212-697-0184 voiceThe Easiest Way To Shop