Re: [stack] function/object ambiguity + quotation alternative

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mar 2, 2009, at 1:44 PM, William Tanksley wrote:

> John Nowak wrote:
>
>> I think you're absolutely right. Forth and friends *demand* short
>> words, and consequently, demand factoring.A language like Scheme
>> makes it harder to factor, but the nesting and locals means much
>> larger definitions are readable, and consequently, much less  
>> factoring
>> is required.
>
> There's truth in what you're saying, but you're missing an important
> fact: short definitions are easier to read in _any_ language. I admit
> that it's important to be able to express longer words.

You're right; I didn't mean to imply otherwise. Ideally, a language  
should make writing long definitions possible (which I often find  
useful in Scheme when prototyping and experimenting) and short  
definitions elegant (which concatenative languages do well). I don't  
know of a language that satisfies both of these criteria to the degree  
I'd like, although some do come fairly close.

> I do agree that Forth is a system language, with poor facilities for  
> any
> higher-level work. I don't concede anything :-) about "Forth and
> friends", since I don't know what languages you're refering to.

I was referring to stack-based languages in general; the average  
length of a function definition needs to be shorter than in a language  
like Scheme to achieve the same level of readability. The nesting in  
Scheme helps visually and things remain mostly understandable even if  
you don't know the arities of all the functions involved. That's only  
my opinion of course; I've not launched a study to determine if this  
goes for most people, although I suspect it does.

> Factor's EMACS mode, "Fuel", supports automated refactoring.

Aye, something like this likely helps by reducing the incentive to  
write large definitions in the first place. It's a shame I've never  
managed to convince myself to learn Emacs.

- John
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.