From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA04375; Tue, 17 Dec 2002 09:29:26 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA04371 for ; Tue, 17 Dec 2002 09:29:26 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from web40803.mail.yahoo.com (web40803.mail.yahoo.com [66.218.78.180]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id gBH8TOH09524 for ; Tue, 17 Dec 2002 09:29:25 +0100 (MET) Message-ID: <20021217030244.64549.qmail@web40803.mail.yahoo.com> Received: from [4.18.166.227] by web40803.mail.yahoo.com via HTTP; Mon, 16 Dec 2002 19:02:44 PST Date: Mon, 16 Dec 2002 19:02:44 -0800 (PST) From: Eric Merritt Subject: Re: [Caml-list] ocaml embedded scripting language To: Dan Andersson , caml-list@inria.fr In-Reply-To: <3DFCA8EB.13742.2E8F165@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Everyone, Well I decided to take dans advice and do a simple forth like implementation. Overall it doesn't seem like its going to be difficult at all. I have run into a small snag. As a side note I have already decided that this is note possible, this is just a last ditch to see if there is a solution. It has to do with the type system more then anything else. I use a stack to handle data that the interpreted process is manipulating. I provide a specific set of words that this forth like language will use to manipulate the stack. Of course, stacks may only be of a single type 'a. So if declare a new type to be type some_type = Int of int | Float of float | Word of string Them my stack is some_type Stack.t Ok this is all fine and dandy, until a few months from now when I want to add a new type say File of Unix.file_descr. The word implementations to support the new type wouldn't actually be a problem. However, extending the type seems to be impossible. The only way I can see to do this at the moment is to modify the type and recompile the whole system. That or come up with some type of indirect identifier piece, but I would rather not do that. I played around with polymorphic variants but that doesn't seem to buy my anything here. Of course, since this is the first non-toy language I have implemented I may be mifundamentalhing fundimental. Please forgive (and hopefully correct) any ignorance I am displaying here. Thanks, Eric --- Dan Andersson wrote: > Forth languages are almost trivial to implement. > > /Dan Andersson > ------------------- > To unsubscribe, mail caml-list-request@inria.fr > Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners