Daniel Duffy
C++ author, trainer
- Joined
- 10/4/07
- Messages
- 10,335
- Points
- 648
Are you doing rust/python/C++ interop for your book? Make a third C++ course please
Code:
fn main() {
println!("Hello, world!");
}
Are you doing rust/python/C++ interop for your book? Make a third C++ course please
fn main() {
println!("Hello, world!");
}
Funny syntax with the ! appended to the function.Code:fn main() { println!("Hello, world!"); }
Maybe it's for emphasis?Funny syntax with the ! appended to the function.
I do prefer that! It indicates it is a macro. I'm sure you'll have lots of fun going into that world.Maybe it's for emphasis?
Should the developer care about it being a macro or function? Seems like something just needless for me to remember.I do prefer that! It indicates it is a macro. I'm sure you'll have lots of fun going into that world.
This is hard to come by it seems and is why I initially came to QN with the question. As far I’ve seen, it’s mostly Rust advocates advocating for something new without really saying when/why it’s better. And in that case, I’d just stick to C++.Question: has anyone written an in-depth, "scientific" comparison of Rust and C++ at a level higher than "factional cheerleading" (no offence intended ?
I found blogs like this.
Rust vs. C++: Differences and use cases | TechTarget
C++ and Rust share many characteristics as programming languages. Developers should compare Rust vs. C++ in terms of these safety and performance features.www.techtarget.com
In particular, precise details (without the handwaving) on why, how and when to use or not use Rust, C++.
I spent the last 3 days doing Rust programming for a bit of relaxation (am almost an expert by now , but being my age means I'm a fast learner). I plan to spend a few more days to suss out more features. It is just a C++20 lookalike; if you know C++20 (and you do) then it is a piece of cake.This is hard to come by it seems and is why I initially came to QN with the question. As far I’ve seen, it’s mostly Rust advocates advocating for something new without really saying when/why it’s better. And in that case, I’d just stick to C++.
Good idea. This week I'm just kicking the tyres (like uchi komi) and then I can go to a small app, e.g. Black Scholes (call C++/C maths function from Rust). yes??Would be nice to see you implement something a bit more complicated in Rust and compare and contrast it to the C++ implementation. Can be finance related, or whatever other topic you like.
Would be downright excellent!Good idea. This week I'm just kicking the tyres (like uchi komi) and then I can go to a small app, e.g. Black Scholes (call C++/C maths function from Rust). yes??
Rust does not have much OOP support ..
Our goal is eventually interop.
In Volume II of book. This be Vol I.Would be downright excellent!
Also some of the more popular/common software design patterns used.
That seems fairly limiting, don’t you think? OOP is really useful in a lot of cases. Makes it seem like it’d be difficult to build a trading system or pricing libraries, etc.Rust does not have much OOP support ..
Our goal is eventually interop.
Who would like me to write a small precise report on Rust?
Coming up, Sir!I’d really like to see this!
Perhaps it’s a language more suited for data processing relative to OOP?Random question: why is there a plethora of Actor "frameworks" in Rust?
It is probably a junior version of Erlang?Perhaps it’s a language more suited for data processing relative to OOP?