[Discuss] Functional programming @ UVic (was 'C' string tokenizer for those who hate strtok)

Brian Quinlan brian at sweetapp.com
Mon Jul 3 11:57:36 PDT 2006


dbarker at turing.cs.camosun.bc.ca wrote:
> When I started at camosun (1991) we were using Modula-2 (another Wirth
> language, sort of pascal in UPPER CASE) as our main teaching language.

When I took my first programming course at SFU (1995?), Modula-2 was the 
teaching language.

> It had the elegance of pascal and a few vey neat features (separate
> definition and implementation files and compil;ers which checked same
> for consistency, inter alia) but hardly anyone in N America (or the UK
> - Europe was another matter) used it commerically.

Metrowerks (when they were still based in Quebec) cut their teeth 
writing a Modula-2 compiler.

>> I agree that Perl would be a poor choice (although, it is very 
>> multi-paradigm: imperative, OO, and functional styles are all 
>> represented).  The problem I have with Python is that it's too different 
>> from other languages (no statement terminator, the use of whitespace for 
>> blocking, etc).

There criticisms are basically the same.

> I believe that as of python 2.something you can use { and } to delimit
> blocks.

Nope. This is not possible not will it ever be.

> As for python being too much OO, I'm not sure where you get this
> notion from. All the OO stuff is there but you don't have to use
> any of it. You can write entire systems which don't use the word
> 'class' once. (as opposed to the pathetic java insistence on having a
> 'main' class! Oh really...)

But you would almost certainly have to use the methods of built-in types 
e.g.

a = []
a.append(1)
b = "Brian Quinlan"
first, last = b.split(" ")
...

That makes it important to understand a little bit about objects.

Cheers,
Brian



More information about the Discuss mailing list