[Top][All Lists]

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

Re: Patch (Re: [Texmacs-dev] Once again: automatic quoting)

From: Immanuel Normann
Subject: Re: Patch (Re: [Texmacs-dev] Once again: automatic quoting)
Date: Mon, 17 Oct 2005 14:37:33 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20050404)

At first: This mail is only about the question: Is Scheme a bad choice as programming language for TeXmacs?

Norbert Nemec wrote:

Henri Lesourd wrote:

But perhaps I don't look exactly at the right
place : could you elaborate more on why, precisely
you feel that Scheme is one of the more uncomfortable
languages for you ?

I think it is for a large part the syntax. There are other functional
programming languages that have a greatly improved syntax compared to
the old style Lisp. (Haskell, Ocaml and others)
The "improved" syntax of Haskell or Ocaml as opposed to Scheme's "non-syntax" is an extremely superficial aspect to compair these programming languages. The main contrast is that Haskell as well as ML (or its dialect Ocaml) is a statically typed language whereas Scheme is dynmaically typed. And the well known main advantage of statically typed languages is that they reduce in general the number of runtime errors signficantly. And the main advantage of functional languages like Haskell as opposed to all imperative statically typed languages (I know) is that Haskell and ML have a very powerfull type inference system which makes code even more reliable and moreover disburden the programmer from explictly typing each argument and return value of a procedure.

First, one should get rid of all the parenthesis. Then, there should be
sane infix notations for operators.
Finally, it would also be possible to use a syntax that is very near to
what people know from imperative languages. Fact is: the majority of
programmers has experience in C/C++, only few are comfortable with
functional programming. It is possible to hide the functional character
of a language to a large extent. Basically, Scheme already is not purely
functional any more. One could very well adjust the syntax to that fact.
In fact Scheme's "non-syntax" is something I appriciate very much. Every expression is in prefix notation and there is no precedence of one operator over the other. So you don't need to learn any syntax and don't need to rmemeber any precendence rules. (One reason why Sussman chose Scheme for his very famous book "Structure and Interpretation of Computer Programs"). Moreover lists and procedures share the same simple syntax which facilitate all the possibilities of transforming code to data and vice versa. One application are macros. Finally I find Scheme a good choice for TeXmacs since it is a lot of manipulting trees i.e. lists of lists and that is something you can do with a functional programming languages much more compact and concise then in any standard imperative language.

The only point I see against Scheme (and any functional language) is that there are much more programmers with experience in imperative languages than in functional languages. It seems that some concepts of functional programming (e.g. higher order functions) are a barrier for impertive programmers. However these concepts are very powerful and may be they contributed considerbaly to the success of TeXmacs.

Immanuel Normann

reply via email to

[Prev in Thread] Current Thread [Next in Thread]