Question:
Does Python have any notable advantages over Java?
K
2009-05-19 09:19:47 UTC
Python VS Java as a first language to learn before or in parallell with Perl, with a view to using it in genetics and other biosciences applications.
Three answers:
MikeyB
2009-05-19 10:21:00 UTC
For a first language, you should be looking for something that is well documented, simple syntax, and easy to understand.



I personally perfer PHP and Python. Documentation is very good, and a wide community. Python's layout and ideals are very good for understand code and getting the job done. My personal opinion of java is very low. Here is an example refering to a question asked earlier (how can i get the day (mon - sun) from a DD/MM/YYYY ?)



Java:



SimpleDateFormat sdf = new SimpleDateFormat();

sdf.applyPattern(”MM/dd/yyyy”);

Calendar calendar = Calendar.getInstance();

Date processDate = sdf.parse(”4/10/2007″);

calendar.setTime(processDate);

Int date1 = calendar.get(calendar.DAY_OF_WEEK);



PHP:



day = date("l", "4/10/2007");



Python:



import datetime

day = date.strptime("4/10/2007").weekday()



MikeyB
draciron
2009-05-19 17:06:14 UTC
In terms of learning the language Python is considerably easier to learn. Java is no easy language to learn. Python is a bit easier to learn than Pearl because Perl's insidious tendency to become ofusticated and the dependency hell that Pearl apps easily become.



Python, Perl and Java all share the C style syntax and much of the basic syntax is shared.
?
2009-05-19 16:22:40 UTC
pythons are always more powerful then coffee


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...