Re: Forth and Unix -- history



John Doty wrote:
Elizabeth D Rather wrote:
....
John Doty is partially correct on this one. Prior to Forth94, it was universally assumed that 1 byte = 1 char = 1 address unit (AU) = 8 bits. However, members of the TC had recent or current experience with processors with 4-bit AUs and 16-bit AUs, not to mention 32-bit characters. So, the Standard introduced the distinction between characters and AUs.

Where I disagree is that this is a "kludge" that makes the language cumbrous and difficult. My experience is that it's been workable and convenient.

It's still a kludge, a violation of the cell concept. Why not also have separate containers for addresses and integers? That also makes sense on some processors.

I'm not sure where you get this "cell concept", which has never been integral to Forth. Forth provides handlers for containers of whatever size is useful on a particular architecture, but does not attempt to prescribe the nature of the content of those containers. As Chuck once said, "If I want to add 1 to the letter B, I don't want a compiler telling me I can't do that. I'm willing to accept responsibility for the result."

C@ and C! deal with a character-sized entity, but if that's convenient for handling an 8-bit number (which it often is), no problem. 2@ and 2! deal with two cells, but whether they're a double number, a floating point number, a pair such as addr/length, or two distinct entities with no particular relation is unspecified.

As others have noted, all Forths on 32-bit architectures (and larger) do have half-cell operators. They will probably be standardized one of these days, maybe in the current round. I think all that's required is agreeing on the prefix name (both H<x> and W<x> are in use, I think).

Forth's claimed advantage has always been conceptual simplicity. One kind of conceptual simplicity is to have a single untyped container for data. But here's a case (and there are many more if you look carefully) where Standard Forth is very irregular, and therefore not simple.

Forth has always been primarily a pragmatic approach to programming computers, providing a tool to do what needs to be done, straightforwardly. Being able to manage different-sized containers is a useful component of this approach. Ideological purity of any kind hasn't been a significant objective. Standard Forth is, indeed, somewhat irregular (as were all older versions), but a great many people (of varying backgrounds and skill levels) have found it useful in a variety of application areas. I can't say the same thing about LSE64.

Cheers,
Elizabeth

--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310-491-3356
5155 W. Rosecrans Ave. #1018 Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
.



Relevant Pages

  • Re: Tuna fish
    ... It has been at least a year since I've purchased tuna. ... The cans have ... (i also only just recently noticed the rectangular plastic lidded containers ... standard package sizes, to be accompanied by howls of rage by the ...
    (rec.crafts.metalworking)
  • Re: Newbie question :) be kind...
    ... measuring system as a thing in itself, ... Consider the standard intermodal shipping containers. ... I liased with New Zealad Railways to move containers around the country. ... Most tunnels would clear the ...
    (rec.models.railroad)
  • Re: Identifying potions from memory
    ... The modern world comes with labels because the containers are all standardised and repeatedly purchased with the product. ... Same for potions, really. ... you'd find it even more likely that there might not be a standard labelling system. ...
    (rec.games.frp.dnd)
  • Re: Which STL should I use?
    ... Many people still use it, however, the correct term is "Standard C++ Library". ... Various iterator classes allow to manipulate content of containers. ... std::deque tries to take best of both worlds providing relatively fast access to an element and addition/removal from/to ends of container. ...
    (microsoft.public.vc.language)
  • Re: Which STL should I use?
    ... STL is an old name that stands for "Standard Template ... Containers and iterators. ... This part was standalone addition to STL until recently. ... providing relatively fast access to an element and addition/removal ...
    (microsoft.public.vc.language)