Re: programming languages

@4:
I feel this requires some comment, because it brushes a whole set of issues under the rug.
I'm not going to start the argument about variable types and declaration in the way that it needs to be started because the way in which the argument is being phrased means that you're not familiar with the argument, which literally tens of thousands of programmers have had before you.  Very vocally and all over the internet.  Google dynamic vs. static typing if you really want to understand the wider claims, and please realize that both languages have things they are better and worse at.  In the end, it just comes down to preference.  That said, dynamic typing seems to be winning-even C# is starting to support some of those features now, and even C++ has removed the need to specifically declare types.  Most of the dynamic languages with implicit variable declaration will complain if you use something on the rhs of an assignment before using o n the lhs, so really the difference here is just that you drop the word int or whatever.  Arguing about it in this manner misses the whole point of the argument, so google the issue if you want to understand it.
Saying that Python/Ruby/whatever has practices that will screw you up in C#/C++/whatever goes both ways.  Because C+/C#/whatever has practices that will screw you up in Python/Ruby/etc, too-I'm thinking of method overloading, modules as code that you cut/paste into another file, being stuck in the mindset of types rather than capabilities.  Since every good programmer I'm aware of is a polyglot, that is knows multiple languages usually of different programing paradigms, this ends up not being an issue save for the newest programmers.
As for "cleverness", well, yeah.  And C# has Linq, C++ has first-class function objects that beat even Python and very strict guarantees on exactly when and how objects will be cleaned up (try au tomatically freeing resources in a garbage collected language, and be very frustrated by the lack of such guarantees).  You can find "cleverness" in almost every language of one sort or another; the only counterexample I can think of offhand is java, but even there people abuse some pretty esoteric features to achieve some pretty basic things that the language doesn't provide for.  I fail to see what's wrong with cleverness applied properly, and I can write both of your examples for Python in C++, all be it with some variable declarations.  The [] operator can be overloaded to provide the negative index functionality in a Pythonic std::vector variant, probably just inheriting from std::vector and overriding one function, and C++11 gives us std::tuple and std::tie, which achieve the same semantics as your tuple unpacking, though I doubt you know it by that name.  Also, no one uses a,b=1,2 in practice, at least not that I've seen-that featu re is meant for and usually used for something unrelated.
And finally, you seem to be not understanding Python fully.  Private is not part of the Python vocabulary.  If it starts with _, the convention is that you don't use it in your code.  But this is a convention.  And I have no idea what you mean by assigning constructors to a variable-they're specially named functions, like in every other language, and you do your initialization in them, again like every other language.
I'm just going to close with this.  Python is about assuming that the programmer using it is trustworthy and adult enough to know that touching private things is bad and assuming that programmers can write good programs when given extra capabilities.  C++ is about assuming that you want performance, and the entire language falls out from this, including it's most esoteric features and extreme levels of complexity (if you disagree with this last bit, you do not know C++; Google variatic templates, move constructors...).  java is about assuming that you are a bad programmer, and consequently giving you absolutely one way to do everything, so that even bad programmers can work on a team.  This comes at the cost of good programmers liking it, and drops productivity for people who are used to list comprehensions and the like.  C# is about locking you to the Microsoft stack as much as possible, and borrows a lot of philosophy from java.  I'm not claiming that you should go like Python now, but I think it is important to distinguish between things you dislike about Python and things that are actually objectively harmful programming practices.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : jonikster via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : balliol via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hayden via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : balliol via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : balliol via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hayden via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector

Reply via email to