On Oct 31, 7:04 pm, Hannu Vuolasaho
<hannu.vuolas...@nospam.tut.fi.invalid> wrote:
> On 2012-11-01, Hugh Aguilar <
hughaguila...@yahoo.com> wrote:
>
>
>
> > Why are you interested in the internal workings of Forth? Your
> > experience is: "today I wrote few nice words." You are getting way
> > ahead of yourself. I have said many times here that it is a mistake
> > for people to think of Forth as a science-fair project and immediately
> > delve into the internal workings. I recommend instead that you start
> > out by writing application programs --- that is the best way to learn
> > Forth. You can use my novice package:
> >
http://www.forth.org/novice.html
>
> I'm working on application. However when I get something I don't
> understand I usually go to the root and figure out the reason. It's much
> more interesting to study system and see why I made on error. However in
> this case I tried to understand the CREATE DOES> success. What I did and
> how it happened. The missing piece was the system. How it works what
> makes my definitions work like they do and why I can see the differences
> in the dictionary. Sometimes it isn't enough to something to just work.
> I want to know why it works.
I can appreciate the idea of learning how something works, rather than
just a cookbook formula for making it work. I'm the same way. I am
just saying that one ought not to get too bogged down in the nitty-
gritty details prior to obtaining some practical experience --- the
essence of programming is writing programs, not tinkering with the
compiler.
BTW, I don't use CREATE DOES> at all --- that is something that can
and should be ignored entirely --- it seems complicated to you because
it is badly designed (it seems complicated to me too). CREATE DOES>
saves code memory compared to my technique, but memory is cheap these
days --- CREATE DOES> is solving a problem that hasn't been a problem
in over 20 years.
> And I have your novice package. It is good reference and has good ideas.
> However I have never used training wheels and I'm not starting now. I
> started with small motorbike :)
lol
I wouldn't really consider it to be "training wheels." I use it myself
for writing application programs!
How much customization do you really need for arrays and lists and so
forth? There are a few circumstances (mostly involving 16-bit x86
segments) in which data structures can be customized for a particular
application, but for the most part an array or list is going to be
implemented the same way for *every* application that you ever write.
That kind of low-level stuff can be written once and, assuming that it
was written in a robust manner, used repeatedly pretty much forever.
If you re-implement this stuff for every application, it will be
slightly different every time, which will hurt readability.
The data-structures in the novice package aren't a simplistic
implementation, and later on you will write an advanced implementation
yourself --- no, they are as advanced as you are ever going to get ---
the next step up is not to rewrite these basic data-structures, but
rather the next step up is to write application programs.