Post by Konstantin Ignatyevvar carMechanic = new Person()
Just back from a Google Developer Group this past weekend playing (a
little) with DART.
It is structured & strongly typed ... most of the time, but you can skip
the strong typing when you want it exactly in places like declaring
local variables,
so you can use var to declare a local variable.
It includes a free smart editor, debugger. It is designed for better
client side work in the browser and better web apps; there are simple
graphics libraries.
It certainly a little less verbose than Java, so might make a bit less
wordy 1st language.
You also can have methods that are not in classes (since
functions/methods are 1st class constructs in the language) , so you
could start with just a (main) function and skip the surrounding class
Foo { public static void ... Forget about a declaration having extra
crap, the opening of a class to get to the main is wordy! But I've seen
good books jump to the main and get back to explaining that cruft
later. You don't teach about how a car works by explaining the bumper
then the grill then the radiator, just because that's the order from
front to back on a car.
OTOH a new variable assigned to a newly created object takes 6 bits of
syntax. (I don't use the term "ceremony" to describe syntax, that is a
mis-use of a well-defined term in Software Engineering - ceremony is
part of process not of a languages). We're declaring we need a (1) a
storage location we want to refer to with the variable name (2)
carMechanic - to store a reference to a (3) Person, asking for a (4) new
(5) Person object and (6) putting (assigning) a reference to that new
Person object into this new variable/location (1). To me, The truly
extraneous syntax are the parenthesis.
3 could imply 5 or visa vera and 4 might be implied by context, so terse
might be
var carMechanic = Person;
but having syntax for indicating you're creating something new has its uses.
The shorter version seems only trivially different conceptually and
syntactically to me. It certainly ain't conceptually hard, I've seen it
done with cartoonish robots and little boxes.
As to having to start with assembly, I say absolutely B.S. Draw and
talk about sequences of memory locations for instructions and data. Talk
about CPUs, registers, & memory; but using less elegant languages like C
& assembly are not a requirement to learning anything except those
specific bit twiddling languages (I say, having programmed a PDP-8 using
a paper tape reader in 1976).
-Paul
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/seajug/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/seajug/join
(Yahoo! ID required)
<*> To change settings via email:
seajug-digest-***@public.gmane.org
seajug-fullfeatured-***@public.gmane.org
<*> To unsubscribe from this group, send an email to:
seajug-unsubscribe-***@public.gmane.org
<*> Your use of Yahoo Groups is subject to:
http://info.yahoo.com/legal/us/yahoo/utos/terms/