Earlier quoted context omitted.
Right, they're even better than Interfaces: both a contract and a partial implementation. No need for an "Interface" when you've got ABCs.
I see what you mean, but to me abstract classes are distinct from interfaces. Abstract class answers the question "what an object is?", whereas an interface is about what the object can do.
Python has brought computer programming to a vast new audience
181–190 of 268 posts
Re: Python has brought computer programming to a vast new audience
#182Re: Python has brought computer programming to a vast new audience
#183Someone else said this on HN: Python is the second best language in almost every field of computing. That's why there's a library for everything in Python. It's limitations are also not terrible for most people. If you want super fast, you will know how to do that some other way. If you just want simple and easy to read, you use Python.
> Someone else said this on HN: Python is the second best language in almost every field of computing. It isn't. Frankly, it isn't even top 3 in any "field of computing" depending on how you define "field of computing". What python has going for it is the evangelists who do a great job of spreading the word and of course funding - they have lots of money backing the language. Also, being an interpreted language, it h…
Your inclusion of SQL in that list really shows you have no idea what you're talking about.
Re: Python has brought computer programming to a vast new audience
#184Python is a great language to start programming in. My biggest frustration with traditional programming languages (well, C/Java mostly) was just how much upfront effort and understand is required to do useful stuff. Whereas with python it is pretty easy to whip up a script, read input and transform it into output in real time etc. That said, I think its also important for Python programmers to dabble at least a littl…
I don't think Java's take on OOP is good to learn before you really understand OOP already. Its heavy handed style of OOP really hasn't aged that well and is rightfully being avoided in all newer languages.
I think it's probably more like this: learning a second, contrasting topic really helps explore the motivations that drive their respective goals.
OOP and Functional are broad classes of contrasting design patterns and philosophies but share the common idea: be principled about state.
Re: Python has brought computer programming to a vast new audience
#185Re: Python has brought computer programming to a vast new audience
#186Earlier quoted context omitted.
Listen to how people who don't program describe the task of transforming each element of something. In my experience they often say something along the lines of, "I want y for each x in z," rather than, "For each x in z, I want y." The latter is more common among people who've been programming in certain languages, not the average person. I don't have systematic data collection for this, just personal experience. But…
> Listen to how people who don't program describe the task of transforming each element of something. In my experience they often say something along the lines of, "I want y for each x in z," rather than, "For each x in z, I want y." If we're really at the point where we're arguing between which clause order (among other potential variations in expression) is more natural across most natural language speakers, that s…
I'd love to see the data.
> software ... built by people ... off the street
Programming is such a rapidly growing field that I think the majority of software will be written by programmers with less than 1 year experience. For a time, anyway. Maybe in 20 or 30 years the growth will slow.
Re: Python has brought computer programming to a vast new audience
#187Earlier quoted context omitted.
Other than interfaces and generics (which would make no sense to add in Python, since it's dynamically typed), can you name some OOP features Java has that Python doesn't have?
This may sound super n00b but I really like that Java is explicit about everything. So for instance, you explicitly specify variables, methods as private with the keyword 'private'. In python you have to use an underscore, and its still not really private, its obfuscated. That's just one example, but in general I really like that kind of by-the-book verbosity, instead of having to mentally map it into the OOP concept…
Re: Python has brought computer programming to a vast new audience
#188Earlier quoted context omitted.
Other than interfaces and generics (which would make no sense to add in Python, since it's dynamically typed), can you name some OOP features Java has that Python doesn't have?
This may sound super n00b but I really like that Java is explicit about everything. So for instance, you explicitly specify variables, methods as private with the keyword 'private'. In python you have to use an underscore, and its still not really private, its obfuscated. That's just one example, but in general I really like that kind of by-the-book verbosity, instead of having to mentally map it into the OOP concept…
Python keeps code much smaller but above a certain size I wish I could "promote" parts of my code to Java.
Partial typing in Python just isn't close to feeling the same.
Re: Python has brought computer programming to a vast new audience
#189Someone else said this on HN: Python is the second best language in almost every field of computing. That's why there's a library for everything in Python. It's limitations are also not terrible for most people. If you want super fast, you will know how to do that some other way. If you just want simple and easy to read, you use Python.
> Someone else said this on HN: Python is the second best language in almost every field of computing. It isn't. Frankly, it isn't even top 3 in any "field of computing" depending on how you define "field of computing". What python has going for it is the evangelists who do a great job of spreading the word and of course funding - they have lots of money backing the language. Also, being an interpreted language, it h…
Re: Python has brought computer programming to a vast new audience
#190Earlier quoted context omitted.
This may sound super n00b but I really like that Java is explicit about everything. So for instance, you explicitly specify variables, methods as private with the keyword 'private'. In python you have to use an underscore, and its still not really private, its obfuscated. That's just one example, but in general I really like that kind of by-the-book verbosity, instead of having to mentally map it into the OOP concept…
Why would you want to actually enforce privacy? That makes it harder for the user to patch. Better to provide a mild discouragement via "_name".