Live data from Hacker News

Python, as Reviewed by a C++ Programmer

sgh1.net

71–79 of 79 posts

Re: Python, as Reviewed by a C++ Programmer

#71
post #9
post #5

Earlier quoted context omitted.

One thing where Rust is rather lacking is the missionarism of some people in the community.

The Rust Evangelism Strike Force is a huge turnoff to the language. It's gotten to the point where we can't have reasoned discussions about C++ or C, let alone about their merits, without a newly enlightened user coming in and trying to direct the conversation to Rust. It's really okay to have a future where C++ and Rust are both popular, widely used languages. I'm happy to acknowledge the merits of Rust as a languag…

FWIW, the behaviour is not just not endorsed, but actively disendorsed, e.g. the code of conduct (which applies to the Rust-team-run venues) includes "Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.", and /r/rust has a "No zealotry" rule. Both of these are enforced in their respective spaces, and both of these have existed for years: they're not a reaction to the recent RESF meme.

It's... harder/less-defensible to enforce codes of conduct/rules like these in third-party spaces, but Rust people still do often call out incorrect assertions/ridiculous comments. Someone not familiar with the community may not recognise that the people doing the calling out are actually "prominent" voices.

Re: Python, as Reviewed by a C++ Programmer

#72
post #42

What is a "C++ programmer?" On any given day, I poop you not, I'm writing either c#, java, c++ or any number of scrpting languages (perl, bash, python, JavaScript). Do people seriously only use a single language these days!?

Why do you jump between multiple languages all the time?

Best tool for the job.

Re: Python, as Reviewed by a C++ Programmer

#73
post #71
post #9

Earlier quoted context omitted.

The Rust Evangelism Strike Force is a huge turnoff to the language. It's gotten to the point where we can't have reasoned discussions about C++ or C, let alone about their merits, without a newly enlightened user coming in and trying to direct the conversation to Rust. It's really okay to have a future where C++ and Rust are both popular, widely used languages. I'm happy to acknowledge the merits of Rust as a languag…

FWIW, the behaviour is not just not endorsed, but actively disendorsed, e.g. the code of conduct (which applies to the Rust-team-run venues) includes "Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.", and /r/rust has a "No zealotry" rule. Both of these are enforced in their respective spaces, and bot…

This is like the evangelists' attempt to distinguish "safe rust" from "unsafe rust": it's a distinction without difference. "The community" isn't just the inner circle of official Rust team members and evangelists and their particular forums where they can enforce any policy as aggressively as they like. For better or worse, "the Rust community" will necessarily be bigger than that if/as Rust grows.

My view is that Rust risks a similar track as Haskell if the community continues to grow in the way it has recently. It's not a healthy community, outside of the circles you note. Quite the opposite--I view it rather as being fairly toxic.

Re: Python, as Reviewed by a C++ Programmer

#74
post #73
post #71

Earlier quoted context omitted.

FWIW, the behaviour is not just not endorsed, but actively disendorsed, e.g. the code of conduct (which applies to the Rust-team-run venues) includes "Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.", and /r/rust has a "No zealotry" rule. Both of these are enforced in their respective spaces, and bot…

This is like the evangelists' attempt to distinguish "safe rust" from "unsafe rust": it's a distinction without difference. "The community" isn't just the inner circle of official Rust team members and evangelists and their particular forums where they can enforce any policy as aggressively as they like. For better or worse, "the Rust community" will necessarily be bigger than that if/as Rust grows. My view is that R…

I don't understand what exactly you're disagreeing with. I was strengthening "I'm sure the language designers and core developers don't actively endorse this behavior", and also mentioned how those people do try to keep discussions truthful and relevant outside those spaces.

Re: Python, as Reviewed by a C++ Programmer

#75
post #42

What is a "C++ programmer?" On any given day, I poop you not, I'm writing either c#, java, c++ or any number of scrpting languages (perl, bash, python, JavaScript). Do people seriously only use a single language these days!?

Why do you jump between multiple languages all the time?

Different tools for different tasks. Not gonna use C to analyze some text files...

Re: Python, as Reviewed by a C++ Programmer

#76
post #27

For me the biggest downside of dynamically typed lanaguages like Python and Javascript is that a small error in passing a function's parameters can propagate very far in a complex system. E.g. if you mistakenly interchange two consecutive function parameters, you could spend several hours debugging the effect several modules down. This is an error that a C++ compiler would catch right away.

The cpp compiler would catch it only if the incorrect data was of a different type. Type specification and hinting only helps with the more egregious mistakes.

Re: Python, as Reviewed by a C++ Programmer

#77
post #31

Earlier quoted context omitted.

It may be implemented as call-by-reference, but the semantics are not the same as what one thinks of when he hears that phrase.

In what way are they different?

With anything immutable.

Re: Python, as Reviewed by a C++ Programmer

#78
post #47
post #38

Earlier quoted context omitted.

In a classic call-by-reference, changes you make to the passed parameter are seen by the caller when the function returns. That doesn't happen consistently with Python.

I think you're just using "classic" to mean the behavior of languages like C++. Under the hood there are only two ways this mechanism can function, and I don't think it helps to mix high level language semantics in when trying to explain it, as those semantics are always expressed in one of those two ways.

I'm using "classic" to refer to the way things were done when the terms were first invented. Old languages like C or Fortran.

Python uses references implicitly without ever defining the term, so it's essential to talk about the high level semantics in this case. A Python reference (implied) differs greatly from a C++ reference in that it can be rebound with the assignment operator. If you're thinking about references in C++ terms then Python will confuse you. It's important to call out the differences.

Post reply on HN