URL: https://linuxfr.org/users/masterdik/journaux/python-et-java Title: Python et Java Authors: Moby-Dik Date: 2003年12月23日T02:47:33+01:00 Tags: Score: 0 Voilà un message trouvé sur les forums de gnomedesktop.org, posté par un Anonymous George. Rien d'extraordinaire mais je trouve ses arguments pertinents. « _Why do you say that Python is much higher level than Java, btw?_ i'm not the person who made that statement, but i would defend it. i'd say Python is higher level because it generally gets itself more out of the way of your problem; there is generally less syntactic overhead to it as compared with Java, less verbosity that needs to be spent on the language's own features and less concern that needs to be given to its peculiarities and limitations. usually, in Python, you can spend a greater amount of time thinking about your problem - as opposed to the language you're trying to use to solve it - than you can in Java. this is partly because Python is dynamically typed, which always helps cut down not only on the verbiage (no declarations, no casts) but also on the distractions (no worrying about what kinds of values can be fit, squeezed or coerced into which variables; just write the code, the language will take care of typing). partly, however, i think it's also because Python's object system is more "informal", more flexible than Java's. in the latter, you're forced to write everything as a class, you have to have the syntactic and structural overhead of organizing everything that way, all the time, and all of that organization has to be spelled out in painstaking detail. it is as if Java had some kind of "static typing" for its object system; it doesn't let you leave any part of it implicit. Python, by contrast, has a much less strict system that mostly "just works" because it relies on the programmer voluntarily using social agreements for, e.g., overloading and namespace imports. there's less syntactic noise, and less worrying about it; yet at the same time, the system ends up feeling more powerful, whether it actually is or not, i think because it lets you just do your job - as opposed to the job of fiddling with the language. these factors, along with a few more, come together to make Python seem a much higher-level language - to me, at least - than Java. the interactive interpreter helps, too - it makes explorative coding and interactive debugging much easier than in your average compiled language. »

AltStyle によって変換されたページ (->オリジナル) /