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

Adam Parkin pzelnip at telus.net
Mon Jul 3 12:42:26 PDT 2006


Brian Quinlan wrote:
>> as are statement terminators, 
> 
> OK, you could terminate your statements with semi-colons, but that would 
> just be wrong.

Wasn't trying to imply that it was "right" to use semi-colons, just that 
it was possible. =;->

> Yep. Python is an OO language, so it has an OO feel :-) You could use it 
> functionally, if you really wanted:

Really?  So functions are first class values and can be passed 
around/returned from other functions?  Closures are easy and natural to 
support? =8-p

> a = []
> a += [5] # instead of a.append(5)
> a = x[:-1] # instead of pop
> a = x[1:]  # (cont'd)

I'm a Perl-person and *I* find that code ugly and cryptic. =;->
--
Adam Parkin
E-mail: pzelnip at telus.net
----------------------
Just as playing Dungeons & Dragons doesn't turn a kid into a wizard, 
pretending to be a homicidal maniac online doesn't make a man a killer. 
But determining what it does make him is one of the biggest ethical 
dilemmas facing modern society.

	-- Rita Ferrandino, http://www.vanderburg.org/Misc/Quotes/quotes.html


More information about the Discuss mailing list