Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Tim Holloway wrote:There are several different name-forming schemes,
You cannot guarantee that the class' designer wants all the fields initialised from constructor arguments. Maybe some of the fields have sensible default initial values.I look at the class definition and think "Where are the instance variables?? What are their types?"
Campbell Ritchie wrote:That looks a nice website, JS
You cannot guarantee that the class' designer wants all the fields initialised from constructor arguments. Maybe some of the fields have sensible default initial values.I look at the class definition and think "Where are the instance variables?? What are their types?"
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Tim Holloway wrote:
The horrible thing about OO Python is that a Python class is a dictionary. Meaning that you can create instance variables within any member function without having named them explicitly in the class definition.
There is no concept of "public" and "private" members, so the distinction is made via naming conventions (starts with underscore).
And of course, it's one of those languages where "constants - aren't and variables - won't". No manifest constants.
Needless to say, these features mean that large-scale Python code can get quite fragile, which is why some of the major players have been forced to invent special tools to attempt to foil some of the issues that can arise.
Jesse Silverman wrote:
As I think you spend more time in Java than anything else, this particular article might make sense to you:
https://realpython.com/oop-in-python-vs-java
Jesse Silverman wrote: but working on code that controls people's life savings, for instance, I feel like I might get slapped with a paternity suit if I'm not careful, despite being a consenting adult.
.
Jesse Silverman wrote:Python lets you do a lot of stuff that would never ever compile in Java/C#/C++.
Some of it could easily do Very Bad Things that would have economic consequences, if you miss just a test or two.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Tim Holloway wrote: similar issues can arise that a strongly-typed programming language would have forestalled because that particular class of errors would keep the code from compiling in the first place.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Tim Holloway wrote:lower-case+underscore (C-like)
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie wrote:but also needs less changing to run on different platforms.
IDEs are programmed to look for compile‑time errors; they show error messages for Java® code too, before you try to compile and run it.
Monica Shiralkar wrote:
Like in Java we have to change forward slashes* to backward slashes when switching between Windows and Linux ?
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Jesse Silverman wrote:
Basic entry-level beginning Python is pretty simple and basic still, fine.
If you want to know everything about Python, that is now a lot.
The horrible thing about OO Python is that a Python class is a dictionary. Meaning that you can create instance variables within any member function without having named them explicitly in the class definition.
(This is implemented by calling getattr(object, name) and seeing whether it raises an AttributeError or not.)
rubbery bacon. crispy tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
|