The Artima Developer Community
Sponsored Link

Python Buzz Forum
Moving from Python to Java :(

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Baiju M

Posts: 225
Nickname: baijum81
Registered: Aug, 2004

Baiju M is a new user
Moving from Python to Java :( Posted: Apr 28, 2005 2:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Baiju M.
Original Post: Moving from Python to Java :(
Feed Title: Programming life without Python(?)
Feed URL: http://baijum81.livejournal.com/data/rss
Feed Description: Programming life without Python(?)
Latest Python Buzz Posts
Latest Python Buzz Posts by Baiju M
Latest Posts From Programming life without Python(?)

Advertisement
For last 9 months my company was developing an
enterprise application. Our main language was Python.
Its going to implement all over India by next few months.

Next month we will start our new project, Java will be our main
language. Now I started refreshing my Java. And this is one thought
came to me today, when I looked into Strings in Java.

One of Python's primary design principle is that:
"Special cases aren't special enough to break the rules."
That is, the language should avoid having privileged features
that you can't reuse for other purposes. The consequence of this
principle is, more generalisation of syntax and semantics
of a language.

In Python : (of course, there are better ways)
age = 9
print "He is " + str(age) + " years old."

In Java:
int age = 9;
String s = "He is " + age + " years old.";
System.out.println(s);

Concatenating string and integer like this is possible in Java,
because it is a "special case".

So, I should be very much bothered about Java's special cases.
Otherwise I will code something like :
String s = "four: " + 2 + 2;
System.out.println(s);

See, here I should have been written :
String s = "four: " + (2 + 2);

Brackets (()), plus (+) and quotes ("") put together in different
ways makes lots of special cases.

Now I dream that I am writing Python code as did in the last 9 months.

Read: Moving from Python to Java :(

Topic: New Zealand architecture (Christchurch in particular) Previous Topic   Next Topic Topic: Python dictionary speed optimisation

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use