Re: [stack] Advantages of cat, joy ..?

eas lab <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
We seem to agree that 'human factor' is prime in compter-productivety.
And that its hard to analyse/talk-about.
But as JFK said "we're not doing it because it's easy .."

So when reading :
http://concatenative.org/wiki/view/Concatenative%20language/Name
   %20code%20not%20values
and appreciating some advantages of 'cat', when I felt very uncomfortable
with: ----------
> extract
  Here is another dataflow pattern:
var x = ...;
bar(x,foo(x));

   In Factor, we call this dup. If the value x is at the top of the
   stack,
dup foo bar

   applies foo to x, then applies bar to x and the result from foo.
> end extract ===========
 I decided to dig deeper, and found:

The reason why this is BAD compared to a blok-structured procedural langs.
is that it doesn't 'express in the problem domain notation'.
YOU have to 'factor' instead of writing in the problem-domain
notation, and allowing
the compiler to factor [for optimisation if it 'wants' to].

Ie. if I write: UsePaintColorFor (red, red(dog)), I'm writing ito the
problem-domain:
'what colour paint to use on what item'. And I'm not interested in optimising
technically that 'red' can be factored out.

This is the same 'problem' as with forth: I have to do the stack
shuffling, instead
of having the compiler do it.

Thanks,

== Chris Glur.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.