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…
Interesting perspective on some of python's features, but I hate to see this "python is neither call by value nor call by reference" silliness perpetuated with a link to the original silly blog post. I'm surprised a C++ programmer was caught by that obviously incorrect assertion.
Claims that Python/C#/Java etc., are call by value where the 'value' is the value of the pointer does not help. It only muddies things. There really ought to be different name for such call semantics and there is. Its called call by object. In C++ lingo call by const pointer comes closest: one cannot change what the pointer points to. However the pointed object may not be a const
No, no, no there is no "call by object." It is precisely this mistaken idea which muddies the waters, as you put it. Virtually all modern processors are stack-based architectures. All arguments to functions are passed on the stack or in registers. The only thing that can be placed onto the stack or into a register are numbers. Those numbers can represent either an actual value or an address in memory. The former is call by value, the latter is call by reference. All high level languages that allow calling functions or methods with arguments have to ultimately use this facility to pass those arguments. Python is most definitely call by reference.
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…
> "The Rust Evangelism Strike Force" Instant classic
I think it was coined by http://n-gate.com (mentioned in HN a few times last month), but I can't be sure.
What I do know is that a) it's hilariously on point b) Google search now autocompletes on it for me.
So true. I want rust to take off, as even bounds checking at compile time would save me a lot of trouble. I don't know if I'll ever be able to deal with the community, though. On the other hand, I've never seen people get as passionate about c++ as I have python and rust, so maybe that says something about the benefits, even if its just as beginners see them.
I think you see people passionate because they've dealt with all the pain around C++. That said I don't agree with the GP. As much as I like Rust there's still a ton of areas that keep Rust from being used today. Library selection, even though it's hard to hire for C++, it's easier than Rust and a few other things. That said for all my personal/greenfield stuff I've been using Rust and really happy with it.
There's a lot of people passionate about it because it's the first low-level language that's reasonably approachable to people who mostly code in Python/Ruby/etc - you rarely ever have to pull out a debugger, for example.
Claims that Python/C#/Java etc., are call by value where the 'value' is the value of the pointer does not help. It only muddies things. There really ought to be different name for such call semantics and there is. Its called call by object. In C++ lingo call by const pointer comes closest: one cannot change what the pointer points to. However the pointed object may not be a const
No, no, no there is no "call by object." It is precisely this mistaken idea which muddies the waters, as you put it. Virtually all modern processors are stack-based architectures. All arguments to functions are passed on the stack or in registers. The only thing that can be placed onto the stack or into a register are numbers. Those numbers can represent either an actual value or an address in memory. The former is c…
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.
Claims that Python/C#/Java etc., are call by value where the 'value' is the value of the pointer does not help. It only muddies things. There really ought to be different name for such call semantics and there is. Its called call by object. In C++ lingo call by const pointer comes closest: one cannot change what the pointer points to. However the pointed object may not be a const
No, no, no there is no "call by object." It is precisely this mistaken idea which muddies the waters, as you put it. Virtually all modern processors are stack-based architectures. All arguments to functions are passed on the stack or in registers. The only thing that can be placed onto the stack or into a register are numbers. Those numbers can represent either an actual value or an address in memory. The former is c…
Couple of things:
1. "Call/pass by XXX" terminology usually refers to language semantics, not underlying implementation details. In that respect, the call-stack mechanism is largely orthogonal here.
2. According to this oft-cited article (in the context of Java), passing an address under the hood is not sufficient to make a language call-by-reference. http://javadude.com/articles/passbyvalue.htm - AFAIK Python would "fail" the "Litmus test".
Claims that Python/C#/Java etc., are call by value where the 'value' is the value of the pointer does not help. It only muddies things. There really ought to be different name for such call semantics and there is. Its called call by object. In C++ lingo call by const pointer comes closest: one cannot change what the pointer points to. However the pointed object may not be a const
No, no, no there is no "call by object." It is precisely this mistaken idea which muddies the waters, as you put it. Virtually all modern processors are stack-based architectures. All arguments to functions are passed on the stack or in registers. The only thing that can be placed onto the stack or into a register are numbers. Those numbers can represent either an actual value or an address in memory. The former is c…
Yes. But. Language designers go out of their way typically to hide this underlying truth, by for example implementing "call by value" when the type of the value is "Customer" or whatever.