On Sep 14, 1:03 am, "Elizabeth D. Rather" <
erat...@forth.com> wrote:
> On 9/13/12 8:25 AM, Jason Damisch wrote:
>
>
>
> >> can changes to such global variables be logged to disk? if so it seem bam then all good
>
> > Sorry but the Forth way is to not let the global variables 'get away from you'
> > I mean don't let the global variables become a problem. Use as few of them as
> > possible, and then test your words on the command line, that should help. I
> > personally have not had a need to write out variables to disk ever, maybe
> > large buffers, but then again there is DUMP.
>
> In my experience, global variables in Forth aren't a problem, and
> they're appropriate whenever you have data that will be used by several
> definitions. I think all this abhorrence of global variables comes from
> dire warnings in other languages (back in the day Fortran programmers
> were taught to hate and fear them).
>
> And in the past we have defined a few project-critical variables to have
> copies residing on disk, so if a reboot is necessary the system can pick
> up where it left off. Nowadays, of course, we'd just put them in flash :-)
>
> Cheers,
> Elizaeth
>
> --
> ==================================================
> Elizabeth D. Rather (US & Canada) 800-55-FORTH
> FORTH Inc.
+1 310.999.6784
> 5959 West Century Blvd. Suite 700
> Los Angeles, CA 90045
http://www.forth.com
>
> "Forth-based products and Services for real-time
> applications since 1973."
> ==================================================
Depends where one sees Forth in the programming language spectrum, I
suppose. I see Forth somewhere close to Assembly - a sort of super-
duper Assembly language on steroids that supports unlimited factoring
and thus abstraction. Assembly has got on just fine with global
variables over the years ;-)
It's interesting that, in my own mind, whilst I consider Forth to be
every bit as 'elastic' as, say, Java (in terms of how you can abstract
the implementation of your application, I still consider Forth to be a
lower level language. I do think it's more malleable (sp?) than Java,
but it's interesting how Forth can be super low-level and highly
abstracted at the same time! One doesn't get that sense/feeling when
using other languages.