[Tutor] Languages, was Which programming language is better

Tim Johnson tim@johnsons-web.com
Thu, 28 Mar 2002 13:56:20 -0900


I've programmed in at least 10 languages, from VAX basic to dBase
to C,rebol,python, various flavors of c/c++, VBA, flavors of Assembler,
Linux shell script, perl, pascal, now am starting smalltalk..... 

In my area, we have set up an online High School criteria, teaching
the following in sequence:
rebol, python, perl c/c++. 
We choose rebol as the starting, because it is highly stable and
felt that it was very easy for the non-programmer to get started with.

We have only one textbook in this series and it is Alan's 
Good work Alan!

In the C/C++ course, I started out by teaching Abstract Data
types using Ansi C, before I even introduced the students to
C+++. I will also use case studies with Little SmallTalk.

In my professional life, I've moved from C/C++ to rebol
for the most part, but Python mediates with perl (my
partner's language of choice) better than does rebol.
Even though rebol seems to outstrip python in terms
of performance and can be less verbose codewise, python
code seems to "do what it's supposed to" more so than rebol
due to it's more disciplined format.

I expect to be doing more projects in python in the future.
Besides, I just "love" that little snake.

> >> I miss 'with' a lot.
  With C/C++'s preprocessor you can actually create new 
  control constructs by "obfuscation", that is you can
  define a 'with' control statement by #define'ing 'for'
  and an example. And the purists just hate that!

  rebol's control constructs are really just functions,
  so you can "roll your own" very easily.

  Tim
* Kirby Urner <urnerk@qwest.net> [020328 13:22]:
> At 05:27 PM 3/28/2002 +0000, alan wrote:
> 
> >
> >me too ;-)
> 
> What's this 'with'?
> 
> In FoxPro we have the following (maybe similar):
> 
> If writing
> 
>    this.parent.parent.otherwidget.subwidget1.value = 1
>    this.parent.parent.otherwidget.subwidget2.value = 2
>    this.parent.parent.otherwidget.subwidget3.value = 3
>    ...
> 
> (long parts repeat) you can instead do:
> 
> with this.parent.parent.otherwidget
>     .subwidget1.value = 1
>     .subwidget2.value = 2
>     .subwidget3.value = 3
>     ...
> endwith
> 
> i.e. I capture a lot of the repetitious "path" type
> stuff with the 'with' (note:  parent.parent... refers to
> a containment hierarchy i.e. what's inside what in a
> GUI, not to a subclass/superclass hierarchy).
> 
> But in Python you can do something very similar just by
> assigning the unchanging part of the path to a variable
> e.g.
> 
> o = container.otherobject.containedobject
> o.property1.value = 1
> o.property2.value = 2
> o.property3.value = 3
>     ...
> 
> Kirby
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com
      http://www.johnsons-web.com