Daniel Duffy
C++ author, trainer
- Joined
- 10/4/07
- Messages
- 10,473
- Points
- 648
Code:
fn main() {
println!("Hello, world!");
}
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 explained | TechTarget
Compare key features and tradeoffs of working with Rust vs. C++, along with programming tips for getting started with each.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?