Re: beginning with ML



Torben Ægidius Mogensen wrote:
Jon Harrop <usenet@xxxxxxxxxxxxxx> writes:
Do you mean take an existing SML implementation and fork it in order to
add the language features I'm describing? If so, which implementations
might be most suitable?

If you want to start from core SML and add features, you could start
from any of the existing implementations, an dthere would be no point
in making a new. If you want to design a new language inspired by
SML, you might as well start from scratch, but you need a design befor
eyou start imlementing.

Many of the features I'd like are already in OCaml and the rest should be
sufficiently trivial that a design isn't necessary (e.g. try finally,
better stdlib).

To the best of my knowledge, none of the authors have any interest
in selling their implementations to a wider audience.

I don't think this is true, though.

Who do you think might be interested in building an open source technical
computing platform based upon ML?

I think this is a great shame because
a closely related language would be ideal for technical computing and
would garner huge interest from scientists and engineers. This is exactly
the market being targetted by Microsoft with F# but no equivalent
innovation is going on in the open source community.

There are various "successor ML" projects underway.

Do you have any references for them? Do they aspire to garner users?

I assumed that was what you meant by "simplified module system". What
were you thinking of?

I was thinking that some of the overlap with type classes might be
reduced. Functors are not really overlapping type classes, so I see
no reason to take these away.

Ok.

Does pattern matching over lazy values count as non-linear?

Not really, no.

Excellent. Would there be much objection to supporting that?

Also, OpenGL interop would benefit from the ability to store vertex data
unboxed in a vertex array. That means unboxing more general data
structures equivalent to a C struct containing bytes, shorts, ints,
floats and so on. You can do this in F# by declaring a struct rather than
a class.

Same as C#, then.

Probably, yes.

Any thoughts on OCaml's semicolon separator and getting rid of as many
brackets as possible?

This is a bit tricky. I'm not terribly fond of Haskell's
layout-sensitive syntax,

Agreed.

but it is better than having to write a lot of parentheses all over the
place. I prefer writing

case e of
p1 => e1
| p2 => e2
end

instead of

(case e of
p1 => e1
| p2 => e2
)

Yes.

I.e., explicit terminating keywords rather than brackets around
variable-sized expressions. But if you could make it optional, that
would be best: "end" matches the closest open "let", "case", etc., but
you don't have to write it unless necessary.

As long as they're optional, that's fine by me. I don't want "end" after
every pattern match.

What about non-recursive type definitions so types can be superceded?

type t = ..
type rec t = ..

Also, what about replacing the built-in list data structure with
something else like a rope?

I'm not sure what you mean by "rope" here.

A balanced binary tree:

http://eigenclass.org/repos/oropes/head/rope.ml

Offers much faster indexing, subsequence, appending and so forth in exchange
for slightly slower prepend and decapitate. It would be a better general
purpose sequence container than a singly linked list.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Re: [POSIX & Win32API] Getting the routing informations
    ... extensions of the C language on this newsgroup. ... I had in mind things like the GNU C language extensions, ... library features that are closely related to the ISO standard library ... provided by other implementations, I just happen to be most familiar ...
    (comp.lang.c)
  • Re: variable allocated from stack/bss ??
    ... acknowledge that they are features of some implementations, ... language. ... Second, even if the OP doesn't care about it, that's no reason not to ...
    (comp.lang.c)
  • Re: R6 Counterproposal
    ... the features in interpreters that support them and ... can decide, in their own implementations, to provide ... Nothing stops anyone from doing that today, with almost any Scheme system. ... Some languages and implementations have done something along those lines, and had some success with it. ...
    (comp.lang.scheme)
  • Re: Where did the prophet really live?
    ... features were in the spoken language or not. ... Now the point that Macdonald makes is that Sabaic was the prestige ... medieval arab historians had reported inscriptions ...
    (soc.religion.islam)
  • Re: Is C99 the final C? (some suggestions)
    ... I can't think of a single feature in C99 that would come as ... There are a number of features in C99 that I will steer away from if ... > * a library function that allows the retrieval of the size of a memory ... With the restrictions of the C language, I think you are going to find ...
    (comp.lang.c)