[Tutor] An example of something extremely difficult to expres s in Java

Karthik Gurumurthy karthikg@aztec.soft.net
Thu, 11 Apr 2002 13:39:03 +0530


> can someone give me neat examples of something which
> is *extremely* difficult to express in java but can be easily
> represented in python?

> Not *extremely* difficult in Java(at least not Java2) but
> a pain none the less is anything which takes a function
> as a parameter. Try writing the Python map() function
> in Java say... Thats not too bad, now try using it for
> a few cases... You'll soon see what I mean.

> Alan G.

i tried writing a command interface to encapsulate a method..i mean the way
Runnable is...to accomodate
a function object. i tried returning an ArrayList.
I did figure out that it is a little complicated.

> Now try writing Danny differentiator function builder....
where can i find this?


ok if we look at the implementation of the proxy pattern in Python,
and the way it's done in java using Dynamic proxy's , we can conclude that
the java equivalne tis quite complicated. It turns out to be a breeze in
Python!

Something along those lines.

I mean when we embed xsl processor into our java-application, XML Stylesheet
language does something which
java w'd find it very difficult to achieve.(ie transformation). Fine the
processor is implemented in Java.
So can we embed python that way and get something *radically* different done
in a highly simplified way?

Sometimes i feel that's not possible simply because Python and Java are very
similar languages by design??
XSL c'd do something for us because Java and XSL are languages meant to
achieve different goals
just some thoughts...

thanks!
karthik.