java 5 could like python?

Roman Suzi rnd at onego.ru
Wed Jan 12 12:03:53 EST 2005


<joking 1/2>
On Wed, 12 Jan 2005, vegetax wrote:

>-No naming convention. The speech of "it fits in my head" is no longer valid
>when i use a lot of functionality,modules,classes in a large proyect.

>For example if i remember a function i want ie:get attribute, i dont
>remember if the module implementer coded it as
>getAttribute,GetAttribute,get_attribute, then i have to go and check the
>doc, every time,which is a waste of time.

Or yes, I hate those 'get' too. Why not to use just obj.attribute instead?
Otherwise, the pluralism present in Python, makes me feel more at home.

>-library Organization,we have modules that can have 20 classes(I imagine
>that is because of the commodity of having all in one file) which makes
>reading the doc horribly painfull and is very hard to find the stuff
>coupled with the "pool" of modules that is the python installation
>directory,all throwed away at the installation directory without a
>categorization.

Probably some Really Large Corporation could add Python Standard Library
Enterprise Edition and win big.

>-Is python library half object oriented? half functional oriented? I can

Right now it change its orientation to iterator/generators...
I image a nice box with Python 3 in it, where there will be no more
inconsistencies with naming, etc.

>understand that python allows some functional programing components when
>they are necesary,but there are libraries that totaly ignore object
>orientation which makes them problematic to use.for example,Whats with the
>os.path module and files? why do i have to say os.path.getfilesize(f.name)
>all the time? why cant i say f.size? Why does urlparse returns a tuple of 7
>items instead of an URL object? why there isnt an URL object? and so on..

This reminds me of attributes vs. tags debate of how to structure XML.

size(f) or f.size() - that is the question

>I havent figured out a way to overcome those factors,the delaying and lost
>of focus that is having to check the docs all the time,every 5 seconds and
>having to make object oriented wrapers for several libraries or having to
>go and read the source code to know what the heck a function returns or
>what are its arguments makes coding unpleasant an very slow , i often have
>15 pydocs windows open at the same time. What should i do?

Do not use windows. Sit for an evening add read all the docs.
Coding will becaome much faster.

>-Realying on ides is imposible due to python dinamic nature,very litle(next
>to nothing) assistance can be espected from them.

Class browsing and auto-completion are probably the only features
I sometime miss. But otherwise what IDEs are for?

>-Memorazing all the function names,parameters,return values,conventions of
>the modules i use doesnt look like a good solution.

But it is a must: how do you communicate if you do not nother to
remember words?

>Join it with poor and outdated documention and we have a very unpleasant
>standard library.

>class C{
> public void func(){
>   print("hello world"); // instead of System.out.println("hello world");

Probably print statement will not make it into Python 3.0. Very sad.

>   print(run("ls /tmp"));
> }
>}
>
>Same for almost all python builtin functions.
>
>Also there is the generics support and so on..
>
>But for some reason i dont know,the switch back feels wrong =( ,would it be
>posible to imitate python's behavior with the new java features and some
>hacks? would be worth the effort? If not what can i do to use efficiently
>python modules and libraries? I recall, i didnt had this problem when doing
>small applications with a small set of modules.
>
>Sorry for my bad english.

That is it. I hate English. It has sooo much exceptions to remember!
Esperanto is much cleaner language. UN should drop all it's
official languages and use Esperanto instead.

</joking>

Sincerely yours, Roman Suzi
-- 
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3



More information about the Python-list mailing list