<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Enigma Curry - Latest Comments in Python vs Java</title><link>http://enigmacurry.disqus.com/</link><description></description><atom:link href="https://enigmacurry.disqus.com/python_vs_java/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Sat, 24 Oct 2009 17:04:06 -0000</lastBuildDate><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-20944401</link><description>&lt;p&gt;Should be __init__ not __int__&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EnigmaCurry</dc:creator><pubDate>Sat, 24 Oct 2009 17:04:06 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-20944037</link><description>&lt;p&gt;hi ryan,&lt;br&gt;getting error on your python sample code : &lt;a href="http://pastebin.com/m43daa46c" rel="nofollow noopener" target="_blank" title="http://pastebin.com/m43daa46c"&gt;http://pastebin.com/m43daa46c&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; &lt;br&gt;Traceback (most recent call last):&lt;br&gt;  File "/home/robert/Documents/python/&lt;a href="http://p2.py" rel="nofollow noopener" target="_blank" title="p2.py"&gt;p2.py&lt;/a&gt;", line 7, in &amp;lt;module&amp;gt;&lt;br&gt;    appleList = [Apple('golden delicious'),&lt;br&gt;TypeError: this constructor takes no arguments&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">robert</dc:creator><pubDate>Sat, 24 Oct 2009 16:49:39 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-6384812</link><description>&lt;p&gt;Cool! Try and find a local user group, if you can. Meeting other people who use the language on a daily basis is both fun and enlightening.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">EnigmaCurry</dc:creator><pubDate>Wed, 18 Feb 2009 17:29:23 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-6384543</link><description>&lt;p&gt;Here I am again.&lt;/p&gt;&lt;p&gt;Python is really very good, I had to learn it because of my job.&lt;/p&gt;&lt;p&gt;Now I am testing Jython, its a python implementation that runs over JVM and can use Java API.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Wed, 18 Feb 2009 17:19:47 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763058</link><description>&lt;p&gt;When I was required to learn Python for a new job in 2003, I had been coding in Java as my preferred language since Java 1.0 in 1995. I went down the Python path kicking and screaming every step of the way.&lt;/p&gt;&lt;p&gt;Now, 5 years later, assuming that I had a choice (and I often do), I would choose Python over Java for all but the largest software projects ... say greater than 100,000 lines of Java code (40,000 lines of Python code). While there are exceptions where existing Java libraries provide a higher return on investment compared to Python, it takes a very large project for the general advantages of Java to become apparent.&lt;/p&gt;&lt;p&gt;And I know hard core Python programmers who think I'm nuts to use Java in these cases as well.&lt;/p&gt;&lt;p&gt;I love Python whereas Java is a decent meal ticket.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rastus</dc:creator><pubDate>Wed, 07 Jan 2009 14:02:57 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763057</link><description>&lt;p&gt;Can't compare. Python is a multi-paradigm, VHLL with clean syntax. Java is an ugly mishmash of concepts and syntax.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Henrique</dc:creator><pubDate>Sat, 15 Nov 2008 14:28:20 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763056</link><description>&lt;p&gt;ps: how do I edit my post here? I have posted wrong website in previous post, lol&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Thu, 04 Sep 2008 15:55:03 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763055</link><description>&lt;p&gt;Hello Ryan.&lt;/p&gt;&lt;p&gt;Well, I agree with u that Python does more in less lines of code. At least in this case I think I cant reduce the code, unless I put everything in 1 line, but that would be completely horrible, lol. In your case u can reduce even more ur lines of code (ie all apples in 1 line), so I must respect that.&lt;/p&gt;&lt;p&gt;About OO, my code is following OO rules. Maybe it is strange because of the main() method inside the same Apple class, but that is not a problem, u can use the Apple as a normal object. The only difference is that it has a main() method. If u want, u can add main() in every class to do some tests or to have an example of how to use your classes. But u must remember that by convention the class that will run your application must be called 'MainClass'.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Thu, 04 Sep 2008 15:49:32 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763052</link><description>&lt;p&gt;Hi Carlos,&lt;/p&gt;&lt;p&gt;The link feature works, you just need to put some text inside the &amp;lt;a&amp;gt; and &amp;lt;/a&amp;gt; tags. I fixed it for you above.&lt;/p&gt;&lt;p&gt;Your code is certainly shorter than mine, but it seems quite obtuse to me. Would you actually write Java code that way? It seem not very OO IMHO.&lt;/p&gt;&lt;p&gt;Thanks for dropping by.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ryan</dc:creator><pubDate>Wed, 03 Sep 2008 22:50:57 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763054</link><description>&lt;p&gt;&lt;a href="http://img34.picoodle.com/data/img34/3/8/31/f_applesm_5b8f450.png" rel="nofollow noopener" target="_blank" title="http://img34.picoodle.com/data/img34/3/8/31/f_applesm_5b8f450.png"&gt;http://img34.picoodle.com/d...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Sun, 31 Aug 2008 06:53:56 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763053</link><description>&lt;p&gt;Why I can't put links here?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Sun, 31 Aug 2008 06:41:24 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763051</link><description>&lt;p&gt;The code above is horrible, so &lt;a href="http://www.picoodle.com/view.php?img=/3/8/31/f_applesm_5b8f450.png&amp;amp;srv=img34" rel="nofollow noopener" target="_blank" title="http://www.picoodle.com/view.php?img=/3/8/31/f_applesm_5b8f450.png&amp;amp;srv=img34"&gt; I did an image&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Sun, 31 Aug 2008 06:34:08 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763050</link><description>&lt;p&gt;16-line version of your program:&lt;/p&gt;&lt;p&gt;import java.util.*;&lt;br&gt;public class Apple {&lt;br&gt;    private String type;&lt;br&gt;    public Apple(String type) { this.type = type; }&lt;br&gt;    public String toString() { return type; }&lt;br&gt;    public static void main(String[] args) {&lt;br&gt;        String[] appleTypes = {"golden delicious", "gala", "granny smith", "fuji", "red", "braeburn"};&lt;br&gt;        ArrayList appleList = new ArrayList();&lt;br&gt;        for (String type : appleTypes) appleList.add(new Apple(type));&lt;br&gt;        System.out.println("appleList: " + appleList);&lt;br&gt;        List someApples = new ArrayList(appleList.subList(0, 3));&lt;br&gt;        System.out.println("someApples: " + someApples);&lt;br&gt;        appleList.removeAll(someApples);&lt;br&gt;        System.out.println("appleList: " + appleList);&lt;br&gt;    }&lt;br&gt;}&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Carlos</dc:creator><pubDate>Sun, 31 Aug 2008 06:27:00 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763049</link><description>&lt;p&gt;бля. нашел что с чем сравнивать.&lt;br&gt;ты б еще вспомнил C++ да с Бейсиком сравнил&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">progma</dc:creator><pubDate>Mon, 23 Jun 2008 14:55:33 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763047</link><description>&lt;p&gt;mmx2:&lt;br&gt;&lt;br&gt;&lt;br&gt;"Dick and Jane" is also easier to read than an essay written by Carl Sagan. Readability only counts when it's balanced with economy and expressiveness.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I think at every level Java adds non essential vebosity to the code. IMO, the only line of python that is less readable than java is "for x in someApples: appleList.remove(x)" .. that line only exists because python can't do set operations on lists. If this example had been using the native set class instead it would have been "appleList.difference(someApples)" which is on par with java's "appleList.removeAll(someApples)"&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Most people who are unfamiliar with programming languages are usually at least familiar with basic algebra. In algebra you would usually write things such as "x=4" rather than "Integer x = 4". Also for matrices (essentially the mathematical representation of a list or table) is easily represented as something like "alist = [1,2,3,4]" instead of "List&amp;lt;something&amp;gt; alist = new ArrayList&amp;lt;/something&amp;gt;&amp;lt;something&amp;gt;(Arrays.asList((1,2,3,4)));" .. IMO Python is much more inline with basic algrebraic notation than Java is.&amp;lt;/something&amp;gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ryan</dc:creator><pubDate>Thu, 13 Sep 2007 14:56:03 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763048</link><description>&lt;p&gt;In all fairness, I've not coded anything in python for a long time now (used to create small games with pygame). But Java code (at least in your example) is far more readable than Python's code. Maybe it is because I am so rusty with python, or maybe java indeed is a much more clear language. Having less lines of code does not necessarily makes a code more efficient or easier to read and this example proves just that. In my honest opinion as a non-prof programmer, that is...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mmx2</dc:creator><pubDate>Thu, 13 Sep 2007 05:07:27 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763046</link><description>&lt;p&gt;@Hans Granqvist&lt;/p&gt;&lt;p&gt;Yes, there are two classes. However, Java requires the main function to be wrapped in a public class. This is loosley analogous to the "if __name__ == '__main__':" in python.&lt;/p&gt;&lt;p&gt;However, it does appear that I have some problems with my java code.. I'll upload a remake later today.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ryan</dc:creator><pubDate>Thu, 03 May 2007 13:37:07 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763045</link><description>&lt;p&gt;Yeah, Java is verbose, but your examples are not equal. The Java example has an extra class, ListExampleClean, which adds two lines to the Java code.&lt;/p&gt;&lt;p&gt;BTW, python doesn't have "list.remove(list)"? I guess you'd have to use set differences, which actually sort of makes sense.&lt;/p&gt;&lt;p&gt;Nice indentation! :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hans Granqvist</dc:creator><pubDate>Thu, 03 May 2007 11:44:53 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763044</link><description>&lt;p&gt;Wow, you have no conception of the roots of OO.&lt;/p&gt;&lt;p&gt;Smalltalk ftw?&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;Me: Where did I talk about the history of Object Orientation? I realize that Smalltalk came before both Java and Python, but that has no bearing on the comparison at hand.&lt;/strong&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">O</dc:creator><pubDate>Wed, 02 May 2007 03:20:21 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763043</link><description>&lt;p&gt;Bas,&lt;/p&gt;&lt;p&gt;You're right of course, an IDE can help a lot. I've got my emacs snippets working pretty nicely now. One of them expands "print" to "System.out.println();" which works quite nicely for my python trained fingers.&lt;/p&gt;&lt;p&gt;As far as actually using something other than emacs... I can make the switch from python to java if I have to... but I don't think I can handle giving up my emacs :)&lt;/p&gt;&lt;p&gt;Seriously though, I have tried Eclipse but I can't even figure out how to do a simple macro. I use macros at least once an hour with Emacs. Can IDEA do macros?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ryan</dc:creator><pubDate>Wed, 02 May 2007 02:19:41 -0000</pubDate></item><item><title>Re: Python vs Java</title><link>http://www.enigmacurry.com/2007/04/20/python-vs-java/#comment-5763042</link><description>&lt;p&gt;Just give in get an IDE designed for Java. I agree that Java is very verbose, but using IDEA, I can code in it faster than any of the other languages I use. (C, C++, Tcl)&lt;/p&gt;&lt;p&gt;As for readability: as with any language that comes with experience; I have to strain quite hard to read you python example!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Bas Scheffers</dc:creator><pubDate>Wed, 02 May 2007 02:12:24 -0000</pubDate></item></channel></rss>