[net.lang] The B Programming Language

steven@mcvax.UUCP (Steven Pemberton) (11/07/83)

There is a newsletter on the B programming language now published, and if you
wish to be put on the mailing list, please mail your request to

	...!{philabs, decvax}!mcvax!leo
or
	B Group
	Computer Science Department
	CWI
	POB 4079
	1009 AB Amsterdam, The Netherlands

* B is a programming language for non-professional computer users, also of
  interest to experts. It is a fairly conventional language, but has 
  high-level data-types, and is fully orientated to ease of learning and use.
* B offers all the advantages of strong typing as in Pascal, but without the
  declarations, the types being inferred from context.
* The 5 types of B, easily combined to implement other types, are: number,
  text (strings), compound (like Pascal records), list, and table (generalized
  arrays). Apart from sheer exhaustion of memory, B imposes no limits, so
  identifiers may have any length, numbers any magnitude, lists any size, etc.
* To support top-down programming, B has refinements, which behave like
  parameterless light-weight procedures.
* Nesting is indicated by indentation, so there is no need for begin...end,
  nor can contradiction between indentation and program structure arise.
* Global variables are permanent in B, and since values like lists and tables
  may be extended at will, there is no need for files and file-handling.

For further details, see "An Overview of the B Programming Language"
by Leo Geurts, in SIGPLAN Notices December 1982.

To give a taste of B, here is code that takes a table mapping countries to
capitals (eg capital['Nederland'] = 'Amsterdam'), and produces the inverse
table (so that afterwards country['Amsterdam'] = 'Nederland'):

	PUT {} IN country
	FOR land IN keys capital:
	    PUT land IN country[capital[land]]

B has been running on Vaxes since 1981, and a portable implementation,
written in C, will be available shortly. Information from the above address.

Finally: the name 'B' is a working title: B is unrelated to C's predecessor.

eric@aplvax.UUCP (11/10/83)

	This can't be the same "B" that was the precursor to "C".
That one had much of the flavor of "C", but was typeless, and supported
only "vectors" as its complex data type. I used it in college, but
haven't heard much about it since then. If there really is a new
language called "B", I would strongly recommend a change in name to
avoid confusion, since the two languages seem radically different, and
the "B" I'm familiar with has been around for a long time.

P.S. If the article was a :-), never mind!

-- 
					eric
					...!seismo!umcp-cs!aplvax!eric