[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: If XML is too hard for a programmer, perhaps he'd b e bett


python tree traverse
> I would add, though, that Uche's article and references describing
> generators has prompted me to by my first Python book; I tried grokking
> Stackless but gave up after the old noggin started throwing sparks like the
> Star Trek bridge deck during a Klingon battle.

Indeed, generators are perhaps the most merciful introduction to continuations 
for a programmer of procedural heritage (as mine was).  I first ran into 
continuations in all their glory in Scheme, and I think the two months of my 
adult life about which I can remember no details must be from the period where 
my brain was recovering from the resultant explosion.

I never *really* grokked continuations until I played with Stackless Python, 
and boy did I regret missing them for so many years.  Then Python decided to 
take up just the generator speciaization of continuations, and I was 
disapointed until I learned two things:

1) Generators offer an almost guaranteed "lightbulb" moment for a decently 
trained programmer (I would measure that for this discussion as one who has 
ever had to code a variety of tree-traversal routines)

2) Once you start to really feel the generator zen, you find that you can do 
most of the cool things that continuations offer using generators along.  
David Mertz has some nice articles on IBM dW about simulating microthreads and 
coroutines using generators.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Use internal references in XML vocabularies - http://www-106.ibm.com/developerw
orks/xml/library/x-tipvocab.html
Universal Business Language (UBL) - http://www-106.ibm.com/developerworks/xml/l
ibrary/x-think16.html
EXSLT by example - http://www-106.ibm.com/developerworks/library/x-exslt.html
The worry about program wizards - http://www.adtmag.com/article.asp?id=7238
Use rdf:about and rdf:ID effectively in RDF/XML - http://www-106.ibm.com/develo
perworks/xml/library/x-tiprdfai.html
Keep context straight in XSLT - http://www-106.ibm.com/developerworks/xml/libra
ry/x-tipcurrent.html
Using SAX for Proper XML Output - http://www.xml.com/pub/a/2003/03/12/py-xml.ht
ml
SAX filters for flexible processing - http://www-106.ibm.com/developerworks/xml
/library/x-tipsaxflex.html



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.