Syntax & Sematics [was: Re: [Enough already] Re: Proposal3:

Richard A. O'Keefe ok at atlas.otago.ac.nz
Tue Jun 6 05:34:32 UTC 2000


	For example, C is very good at bit manipulation with shifts and ands 
	and or's.  What would happen there?
	
So is Squeak already.  I don't see any mapping problem there.

	Also, in C truth is equivalent to non-zero, so you could write 
	something in Cish with the intent of testing for zero which you might 
	get back after, Cish -> Squeak -> Cish, as testing for falsehood.
	
That confuses C *syntax* (pretty much the same as C++ and Java *syntax*)
with C *semantics*.  The fact that true = non-zero in C89 is a purely
semantic fact with no syntactic correlate whatsoever.  Note that Java
and C++ have a 'bool' type, and so does C99, and it was always possible
to write C (even in V6) _without_ exploiting the implicit comparison to 0.

C declaration syntax would also have to be bent more than somewhat:
C89-style "auto x, y, z;" would be usable for declaring method and
block locals, but there'd be no place for types.

	So you think, 'I'm writing in C, but I can't do half of what I want', 
	so it's not C and not Smalltalk.
	
Right.  Just like Java.	
	
Some people like C syntax.  Some don't.  Many readers in this list will
probably remember what happened to Dylan.  It started with a very clean
syntax, rather Schemeish, then added a C/Pascal syntax to please the
masses, lost the clean syntax, and never did please the masses.

C syntax has its ancestry in BCPL, and reflects a view that data structures
are very simple things (in BCPL everything was a "word") and the job of a
language is to structure control flow.  That's not really the Smalltalk way
of thinking about things.  Mapping onto C syntax is going to have to do
something special about blocks, so it's not really going to be that C like
_syntactically_.

What is it about Java that makes Java code so amazingly bulky compared
with Smalltalk, anyway?  Is it the syntax?  Is it the woeful split between
primitive types and classes?  Is it the types-are-constraints-not-toolkit
type system?





More information about the Squeak-dev mailing list