Home > Ask the SOA Experts > Questions & Answers > What about comparing the merits of Python and Water?
Ask The SOA Expert: Questions & Answers
EMAIL THIS

What about comparing the merits of Python and Water?

Sean McGrath EXPERT RESPONSE FROM: Sean McGrath

Pose a Question
Other SOA Categories
Meet all SOA Experts
Become an Expert for this site
>
QUESTION POSED ON: 19 August 2003
Your answer concerning Water isn't very satisfactory: being a Python fan, you don't like it. The question is not so much whether or not you like it, but rather how you judge Water's potential. BTW, I don't think it has a lot to do with SGML derivatives. What about comparing the merits of Python and Water?

>
I'm biased of course. My position is that XML is a truly awful syntax to express an imperative programming language in. As soon as you reach the point where you need to express imperative constructs (conditional expressions, loops, selections and so on) the syntax gets in the way. A sign of a good programming langauge, I think, is one in which the syntax does not get in the way, letting the programmer concentrate on what the program is supposed to do.

Here is an example (http://lists.xml.org/archives/xml-dev/200301/msg00406.html)

<!-- Water version of Factorial Function -->
<defmethod factorial n>
         <if> n.<is 1/> 1
         else n.<times <factorial n.<minus 1/> /> />
         </if>
</defmethod>

<test <factorial 10/> 3628800 />
# Python version of Factorial Function
def factorial (n):
         if n == 1:
                 return 1
         else:
                 return n * factorial(n-1)

factorial (10)
I think the comparison speaks for itself!


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SOA Governance White Papers - BPM, EDA, IT Governance
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts