Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: advantages ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 49 of 81 Topic 3560 of 4053
Post > Topic >>

Re: advantages of forth over other languages

by John Passaniti <nntp@[EMAIL PROTECTED] > May 7, 2008 at 06:29 PM

Bruce McFarling wrote:
> Note that for this, a pattern language that is "good enough" to allow
> people to talk about their design activity, and is widely understood,
> is superior to a pattern language that is "ideal" for a particular
> design activity, but is not widely understood.

I'm not sure how to interpret this.  I'm reading it as a concern about 
the structure of design patterns.  Do you think that design patterns are 
in some sense too complicated?

Design patterns (at least as they apply to computer science) are nothing 
more than documentation that provides a name, an intent (goals for the 
pattern), context (where the pattern would be used), and discussion. 
More formally, design patterns have a common recommended structure to 
them.  The Wikipedia article on design patterns gives a good overview of 
the usual sections found in a design pattern:

http://en.wikipedia.org/wiki/Design_pattern_(computer_science)#Documentation

Not every section is necessarily important, and many times, these 
sections are nothing more than a single sentence or a list.

> That is, after all, was the rationale for a Scientific Interactive
> Command Language with Forth as its assembler ... something that looks
> much like a common pseudo-code but can be interpreted, incrementally
> compiled and run, and that when you crack the hood allows you to get
> as close to the metal as the host Forth allows ... which for many
> hosts would be quite close to the metal indeed.

Again, I'm not sure what you're addressing here.

A design pattern is not pseudocode.  The purpose of pseudocode is to 
describe abstractly an implementation.  The purpose of a design pattern 
is to describe abstractly a design.

The difference may be clearer if I take a specific example.

One common pattern is "Chain of Responsibility" (COR).  The basic idea 
in COR is that you have some notion of a command and you pass this 
command on down through code that either acts on the command or passes 
the command on to other code that can act on the command.  An example 
might be a help system in a GUI.  I might point my cursor to some 
on-screen element and issue a "help" command.  The system using COR 
would then pass this request for "help" up through the hierarchy of 
controls on the screen.  So I might point to a number, and ask help.  If 
that control didn't have specific help, it would pass my help command up 
to it's parent, which might be a frame.  If that frame didn't have a 
specific help command, it might pass it up to it's parent.

That, in a paragraph is the essence of Chain of Responsibility and 
that's where the design pattern effectively stops.

The programming looking at this may next need a suggestion of how to 
actually implement this.  This is where pseudocode might come in.

given a command:
     if the object can respond to command:
         do command
         end
     else
         if object has a parent:
             pass command to object's parent
         else
              end (command not handled)

The difference between the design pattern and the pseudocode is that the 
design pattern is more abstract and thus can be applied to a larger set 
of problems.  The pseudocode is making an explicit requirement that 
we're dealing with objects that have a sense of their parent.  This 
wasn't required by the design pattern.

Now, one could certainly look at the psuedocode above and be able to see 
how the basic idea might be applicable to a wide variety of things.  You 
don't need objects with notions of parents.  You could express the chain 
as an array-- passing the command through an array of handlers for the 
command.  Or you might have a system that didn't have lists or arrays 
but some kind of dynamic discovery of how things are connected in a
system.

But in that case, one is taking pseudocode (which is more tightly 
coupled to a particular implementation) and generalizing it-- arriving 
at where the design pattern started.

Or put another way, the best design patterns tend not to come from 
people sitting around thinking abstractly about a problem, but from 
observing actual real systems, identifying the common ideas, and the 
abstracting from there.  Indeed, if a design pattern didn't start this 
way, it's probably suspect.




 81 Posts in Topic:
advantages of forth over other languages
Andreas Klimas <klimas  2007-10-03 00:09:20 
Re: advantages of forth over other languages
"Celime" <cm  2007-10-03 16:59:11 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2007-10-03 17:35:37 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2007-10-03 23:41:47 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-03 21:31:42 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2007-10-05 00:11:14 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-04 18:54:59 
Re: advantages of forth over other languages
Elizabeth D Rather <er  2007-10-04 15:54:29 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-04 20:42:38 
Re: advantages of forth over other languages
Elizabeth D Rather <er  2007-10-04 17:38:16 
Re: advantages of forth over other languages
Nils-Arne Dahlberg <ni  2007-10-05 12:45:52 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-05 12:03:05 
Re: advantages of forth over other languages
kenney@[EMAIL PROTECTED]   2007-10-05 06:01:01 
Re: advantages of forth over other languages
Bernd Paysan <bernd.pa  2007-10-05 14:35:14 
Re: advantages of forth over other languages
kenney@[EMAIL PROTECTED]   2007-10-05 13:41:05 
Re: advantages of forth over other languages
Bernd Paysan <bernd.pa  2007-10-06 14:01:19 
Re: advantages of forth over other languages
"Celime" <cm  2007-10-05 14:41:36 
Re: advantages of forth over other languages
kenney@[EMAIL PROTECTED]   2007-10-05 13:41:05 
Re: advantages of forth over other languages
"Celime" <cm  2007-10-05 14:32:52 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-03 12:15:17 
Re: advantages of forth over other languages
"Celime" <cm  2007-10-05 14:36:07 
Re: advantages of forth over other languages
Jason Damisch <jasonda  2007-10-03 10:50:17 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2007-10-03 18:13:48 
Re: advantages of forth over other languages
helmwo@[EMAIL PROTECTED]   2007-10-03 17:50:41 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2007-10-03 19:42:57 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-04 06:40:55 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2008-04-23 00:56:57 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-04-23 22:21:34 
Re: advantages of forth over other languages
Richard Owlett <rowlet  2008-04-23 20:56:47 
Re: advantages of forth over other languages
John Passaniti <put-my  2008-04-23 23:55:14 
Re: advantages of forth over other languages
Aleksej Saushev <asau@  2008-04-26 11:16:29 
Re: advantages of forth over other languages
Clever Monkey <spamtra  2008-04-30 12:54:44 
Re: advantages of forth over other languages
Albert van der Horst <  2008-05-01 14:28:07 
Re: advantages of forth over other languages
Clever Monkey <spamtra  2008-05-01 12:45:08 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2008-05-01 21:58:50 
Re: advantages of forth over other languages
Clever Monkey <spamtra  2008-05-02 13:11:16 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2008-05-02 12:15:13 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-05-02 20:58:26 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2008-05-02 18:28:21 
Re: advantages of forth over other languages
John Passaniti <my-fir  2008-05-03 03:25:24 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2008-05-03 11:43:40 
Re: advantages of forth over other languages
John Passaniti <put-my  2008-05-04 04:54:23 
Re: advantages of forth over other languages
Bernd Paysan <bernd.pa  2008-05-04 00:30:45 
Re: advantages of forth over other languages
Alex McDonald <blog@[E  2008-05-03 13:06:45 
Re: advantages of forth over other languages
Clever Monkey <spamtra  2008-05-07 16:12:07 
Re: advantages of forth over other languages
Bruce McFarling <agila  2008-05-04 19:45:37 
Re: advantages of forth over other languages
John Passaniti <my-fir  2008-05-06 04:11:01 
Re: advantages of forth over other languages
Bruce McFarling <agila  2008-05-06 12:35:30 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-05-07 18:29:17 
Re: advantages of forth over other languages
Bruce McFarling <agila  2008-05-07 13:14:51 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-05-07 20:45:17 
Re: advantages of forth over other languages
Bruce McFarling <agila  2008-05-07 13:21:16 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-05-07 20:49:41 
Re: advantages of forth over other languages
Bruce McFarling <agila  2008-05-07 15:36:51 
Re: advantages of forth over other languages
Brad Eckert <nospaambr  2008-05-08 08:08:13 
Re: advantages of forth over other languages
Robert Spykerman <robe  2008-05-11 20:06:29 
Re: advantages of forth over other languages
dhoffman@[EMAIL PROTECTED  2008-05-11 23:48:50 
Re: advantages of forth over other languages
Jerry Avins <jya@[EMAI  2008-05-12 18:43:20 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2008-05-13 19:52:50 
Re: advantages of forth over other languages
Alex McDonald <blog@[E  2008-05-12 02:07:34 
Re: advantages of forth over other languages
mhx@[EMAIL PROTECTED] (M  2007-10-03 21:51:07 
Re: advantages of forth over other languages
helmwo@[EMAIL PROTECTED]   2007-10-03 20:00:21 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2007-10-03 23:52:19 
Re: advantages of forth over other languages
helmwo@[EMAIL PROTECTED]   2007-10-03 20:04:29 
Re: advantages of forth over other languages
"slava@[EMAIL PROTEC  2007-10-03 16:52:26 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2007-10-04 00:34:18 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2007-10-04 01:12:50 
Re: advantages of forth over other languages
"slava@[EMAIL PROTEC  2007-10-03 16:54:14 
Re: advantages of forth over other languages
Andreas Klimas <klimas  2007-10-04 00:12:13 
Re: advantages of forth over other languages
stephenXXX@[EMAIL PROTECT  2007-10-04 10:40:23 
Re: advantages of forth over other languages
John Doty <jpd@[EMAIL   2007-10-04 05:51:23 
Re: advantages of forth over other languages
Bernd Paysan <bernd.pa  2007-10-04 15:03:58 
Re: advantages of forth over other languages
John Passaniti <nntp@[  2007-10-05 01:21:18 
Re: advantages of forth over other languages
Elizabeth D Rather <er  2007-10-04 15:44:56 
Re: advantages of forth over other languages
mhx@[EMAIL PROTECTED] (M  2007-10-04 21:59:13 
Re: advantages of forth over other languages
znmeb <zznmeb@[EMAIL P  2007-10-06 22:09:23 
Re: advantages of forth over other languages
David Thompson <dave.t  2007-10-14 23:03:24 
Re: advantages of forth over other languages
=?iso-8859-1?q?Jean-Fran=  2007-11-01 18:14:30 
Re: advantages of forth over other languages
John Passaniti <put-my  2007-11-01 22:02:13 
Re: advantages of forth over other languages
gavino <gavcomedy@[EMA  2007-11-08 16:13:55 
Re: advantages of forth over other languages
Jonah Thomas <jethomas  2008-05-06 07:15:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 20:43:29 CDT 2008.