Re: what kind on programming is lisp?
From: Bernd Paysan (bernd.paysan_at_gmx.de)
Date: 03/07/05
- Next message: Gorbag: "Re: what kind on programming is lisp?"
- Previous message: Edi Weitz: "Re: araneida logging"
- In reply to: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Next in thread: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Reply: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 07 Mar 2005 16:56:33 +0100
Förster vom Silberwald wrote:
> Once you start: managing huge data sets, reading and writing to files
> and at the same time steering external legacy C or Fortran programs
> then you will need a better programming language.
Or a better Forth than the one you know (though I doubt there is one you
know).
> The problem in Forth I gather are not so much related to writing a spot
> on program which runs from the very first start on. I believe you when
> you say so. But the hell will open if you try to change and adopt that
> particular program in Forth.
I've written and maintained a number of bigger Forth programs. It's a
non-issue. While (standard) Forth does not *contain* abstractions like
lists, objects, or arrays, it allows you to *build* them in a few lines
(and most systems indeed have things like that as part of their library).
I've written programs where I changed the underlying abstraction how to
store data. Thinking Forth (http://thinking-forth.sourceforge.net/)
contains a small example where you extend a variable to be redirect to
different classes without changing the rest of the code.
There are differnet "reasons" (or rather sound-bites) why you can't write
big programs in Forth. Let's examine them all together:
* you can't write big programs, because Forth's philosophy is "keep it
simple", and you'll just write a small simple program that does all the
functionality of what would be a large program in another language.
- Ok, we accept that "sound-bite"; we like to keep programs simple ;-).
* you can't write big programs, because Forth is 16 bit.
- Get up and leave the cave where you have been hiding. There are 64 bit
Forths available today.
* you can't write big programs, because Forth source has to fit into one 1k
screen.
- Even more funny, as it never was true ;-)
* you can't write big programs, because Forth is write-only, and therefore,
you can't change what you have written.
- Forth is as "unreadable" as Chinese, Arabic, Russian, or whatever language
you don't understand. Now go and try to write a single correct sentence in
Chinese, and come back when you manage to do that without being able to
read or understand Chinese. Once you've learned Forth and got used to a
style with short definitions, useful stack comments, and good names,
there's no problem. People have written and maintained Forth programs with
up to almost a million lines of code. If you stick your head into the
ground, cover your ears with your hands, and sing "lalala" to avoid hearing
tales like that, all we can do is kick your ass ;-).
Forth and Lisp share a number of features, like interactivity and
meta-programming. They are different on other features, like Lisp having
named, and Forth having unnamed parameters, but allowing named locals. Or
data typing (Lisp: dynamic, the data knows its type, Forth: the
user/programmer names the type). You can combine things by having a reverse
polish lisp (RPL, like on the HP calculators, or PostScript), or an object
oriented Forth extension, which gives you typed data, too. I haven't seen a
Lisp-like syntax with a Forth-like semantics, though.
-- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/
- Next message: Gorbag: "Re: what kind on programming is lisp?"
- Previous message: Edi Weitz: "Re: araneida logging"
- In reply to: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Next in thread: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Reply: Förster vom Silberwald: "Re: what kind on programming is lisp?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|