More Comments on "A Very Quick Comparison of Popular Languages for Teaching Computer Programming"
Pascal
On 3rd December, 2005, Laszlo Balint, a computer science student from Romania, sent me the following Pascal and wondered why I hadn't included Pascal in the first place:
var a,b,c:integer;
begin
readln(a,b);
c:=a+b;
writeln(c);
end.
|
Pascal fails miserably in comparison to Python for expressive power, and also apparently - see this article by Brian Kernighan - in comparison to C.
Pascal has evolved into Delphi, which apparently has a real world following, and is presumably much more able than the Pascal I used at Uni, but this is a proprietary language, and as such I would consider it an inappropriate choice for teaching.
REXX
On 2nd December, 2005, Jon Wolfers wrote:
|
I see you had lots of people sending you their favourites, and was
saddened not to see Rexx there. Many people who use Rexx list it as their favourite language. It combines simplicity of use with readability and power, is very forgiving (as a Python advocate imagine if you could indent freely and include white-space wherever you wanted to aid readability) and now very late in its life it has become open source and freely available (www.oorexx.org) It is far and away my favourite language, so I thought I'd send you my sample submission. Here is the code:
Say 'Type two numbers followed by Enter' Pull a b Say a'+'b'='a+b Things to explain:
|
TCL
On 15th September 2005, Steve Duncan wrote:
|
Couldn't resist replying to your "add two numbers" item. Here's a
Tcl/wish script that pops up a GUI for adding the numbers. The numbers
are syntax checked and can be integers, hex, floating point or in fact
any constant expressions containing standard function evaluations. For
example, you can add 0x4 to log(0.5) if you like.
#!/usr/bin/wish
entry .e1
entry .e2
label .l1
button .b1 -text "Add these two numbers" -command {.l1 configure -text [expr ([.e1 get]) + ([.e2 get])]}
pack .e1 .e2 .b1 .l1
puts [expr ([gets stdin]) + ([gets stdin])] |
In fact, TCL appears to be quite a match for Python in terms of expressiveness, but for a beginner its syntax is not as clear and (more importantly) has less in common with other mainstream languages like C and Java.
Patrick Jordan - patrick@ariel.com.au - 2005-12-14
...original article
...part 2 (comments)