RE: [colorforth] Re-connecting
- Subject: RE: [colorforth] Re-connecting
- From: Frédéric DUBOIS<frederic.dubois@xxxxxxxxxxxxx>
- Date: Fri, 25 Feb 2005 17:21:12 +0100
Ok, Mark. Thanks to your explainations I think I see your idea better.
> > Could you please give me an example of such functionnal language so I
can
> > take a closer look at the concept?
>
> OCaml is one I am familer with, and I only give it as an example, not
> something to emulate exactly. I think functional language of this type are
> an interesting study in language design. They start with a very simple
> model of computation, the lambda calculus, which can represent any
> computation. The lambda calulus has no concept of integers, lists,
> addition, subtraction, however all of these can be encoded as
> terms in the
> language. The encoding of integers as church numerals would be very
> inefficient in practice. The type systems of functional
> languages express
> the kinds of data, and the kinds of programs, the designers think are
> useful. And typed data can have an efficient representation, for
> example integer can be directly represented as a binary word.
> Another view
> of a type, is as description of the data, that is why I bring up this
> example in particular. Although it does not exactly correspond to the
> notion of a database I had in mind.
>
Maybe another model are those OO-languages that let you adding properties to
objects at anytime like Io ( prototype-based OO language ) or "Kevo" which
seems to have Forth genes, although I only saw summaries about it. Of course
most of them rely on late binding. Quoting the overview of oCaml about its
type system " For instance, the sorting procedure for arrays is definied for
any array, regardless of the type of its elements", Io can do the same but
is type-less. I guess that strong-typing allows oCaml not to use
late-binding.
A more-or-less related idea I've experimented a bit with, is to enable each
word to have it's own compile-time behavior. Among other things, it allows
words to modify the context of the interpreter on the fly; Combined with
vocabularies, it enables some OO-like features.
Amicalement,
Frédéric
---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com