[Bluej-discuss] confusion over =

Lon Levy LXL at oregon.k12.wi.us
Fri Nov 30 15:50:20 GMT 2007


Good morning Michael,

I have said numerous times how grateful I am to you and the BlueJ team
for a wonderful pedagogical IDE.  I continue to believe that it is the
best tool for teaching Java.  Now I wish I was teaching Blue instead. 
8-(

A tip of the hat to you, sir,

Lon.

Lon Levy, MS-CSEd
Computer Science Teacher
Volunteer Computer Club Advisor
Oregon High School
608-835-1316
 
Lon.Levy at oregonsd.org
LXL at oregon.k12.wi.us
cs at levytree.net

non somnos requiem


>>> Michael Kölling <M.Kolling at kent.ac.uk> 11/30/2007 5:44 AM >>>
On 30 Nov 2007, at 11:22, Michael E. Caspersen wrote:

> ... teaching language Blue...

Yes, in Blue everything was an object. And operations had a uniform  
syntax, for example

    2.add(4)

But then there were "aliases". I have just looked at the language spec 

again (after a long time!). Here is what it says:

"All types in Blue are classes and all data are objects.  This general 

rule
simplifies the language design.  There are, however, a number of data 

types
for which it is convenient to use syntax other than the Blue object  
call to
perform one of their operations.  The reason for this can be:

	● Another syntax is commonly used and is therefore more
intuitive (e.g.
	  3 + 5 for integer addition, rather than 3.add (5)  ).
	● Another syntax simplifies use of elementary constructs which
should  
be
	  used by beginners before the underlying language concepts need
to be
	  understood, e.g.
		print (“result=“, 42)
	   instead of
		output.write (“result=“.concat (42.toString))
	● Another syntax is more convenient (usually because it is
shorter, see
	  above).

For these reasons, several operations on the predefined classes are  
supported
by special syntax.  This special syntax is allowed in addition to the 

standard
object-call syntax generally available for all classes, and is  
referred to as
aliases.
...
Note that aliases are a pure syntactic addition which does not add any
functionality to the language.  They do not affect the semantics or
the
theoretical language description of Blue (although they are part of
the
language), and are purely intended to increase readability and  
intuitivity of
statements. "

Oh yes, and Blue uses, of course, = for equality check and := for  
assignment...  :)

If anyone is really interested in dead old languages, the spec is
here:

	http://www.cs.kent.ac.uk/people/staff/mik/blue/doc/spec-102.pdf


Michael

_______________________________________________
mailing list bluej-discuss at bluej.org 
To unsubscribe or change your preferences, go to
http://lists.bluej.org/mailman/listinfo/bluej-discuss


More information about the bluej-discuss mailing list