Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dureuill
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
121.
▲
by
dureuill
4y ago
modules were my #1 wanted feature in C++, but they are very disappointing to me: - they allow `.` in their names to signify hierarchy, but have no built-in notion of hierarchy or submodule. This means possible error messages will have to be
122.
▲
by
dureuill
4y ago
As expected modules are relegated to some later time ("will be its own experiment")
123.
▲
by
dureuill
4y ago
The number of excessive keystrokes is largely irrelevant (as long as it isn't an order of magnitude too much), because typing the code on keyboard is generally far from the limiting factor for the speed of writing code. Most of the tim
124.
▲
by
dureuill
4y ago
Also, if you look at the stats for saw-related accidents, 70% of them are impossible when the safety mode of the new gear is enabled (which is the default way of handling it). This is even in professional companies that keep using the old g
125.
▲
by
dureuill
4y ago
It is a very unergonomic choice, though. Having warnings you can allow during development and deny in CI is the best of both worlds. Otherwise it leads to absurd situations where some code gets commented to avoid errors caused by unused thi
126.
▲
by
dureuill
4y ago
i could understand this in 1995, but in 2015? We have peer reviews, and CI. Let's deny warnings there, and allow them during development.
127.
▲
by
dureuill
4y ago
I build locally. On my projects compile time has been much better than in our C++ projects (which is bigger, but still I'd say that rust compilation isn't slower than c++'s)
128.
▲
by
dureuill
4y ago
I mean, it's only natural. I have been using C++, Python and Rust professionally, the developer experience is simply one order of magnitude better with Rust. The tooling is excellent, a sane compilation model brings you a lot, the type
129.
▲
by
dureuill
4y ago
Yes we've been using this. Unfortunately it is not standard and iiuc msvc has no equivalent?
130.
▲
by
dureuill
4y ago
Exceptions are nothing like Rust's Result. - exceptions don't appear in the signature of a function - you don't have to handle exceptions explicitly, while you cannot access the value of a Result without explicit error handli
131.
▲
by
dureuill
4y ago
You could go: result.unwrap_or_else(|| todo !()) (unimplemented! is for missing functionality in a given version, todo! is for missing functionality during development) But using unwrap for these kinds of TODO is ok, code review wo
132.
▲
by
dureuill
4y ago
not sure what you're referring to, but yes having a first iteration of code with unwrap here and there, and then a second one with proper error handling is a viable strategy. the "loudness" of unwrap makes it super easy to no
133.
▲
by
dureuill
4y ago
not sure why you're getting downvoted. maybe the scope of what you're saying ('plenty of "production grade" crates unwrap [when they shouldn't]') calls for a reference? Or maybe because you're singlin
134.
▲
by
dureuill
4y ago
was not aware of crubit, so thanks for posting. i'm trying to follow closely what's happening in this space
135.
▲
by
dureuill
4y ago
> C++ has a standard library and smart pointers that eliminate a lot of errors with dangling pointers, and if people use those exclusively You can't use smart pointers exclusively, because there is no "smart observational point
136.
▲
by
dureuill
4y ago
Programming language efficiency from a developer's standpoint is not measured in bytes written in the source code, because typing characters is never the bottleneck when writing code. Even if it were, most code isn't "fire an
137.
▲
by
dureuill
4y ago
I mean another explanation is that GUIs take a tremendous amount of time and investment, especially in today's environment. C++ was out in 1985, and qt's first version wasn't until 1995, with kde starting in 1997. And these w
138.
▲
by
dureuill
4y ago
> Just my experience, YMMV. Indeed. IME (around 10y C++, mostly c++14 and c++17, and 6y Rust), I measure x2-x3 velocity in Rust, a lot of which comes from the tooling, a part of which from ub-freedom and much easier and safer parallelism
139.
▲
by
dureuill
4y ago
I would not say that Rust is easy to use; rather, it is hard to misuse. The guardrails make it harder to shoot the proverbial foot, but also to get code to compile at all. Well, at least at the beginning. One becomes used to the so-called &
140.
▲
by
dureuill
4y ago
While I did not use C++20, I did follow its new feature set, and did not see anything able to address the issues of C++: - no way to express "lifetime relationships", they remain in comments or force you to work around the problem
141.
▲
by
dureuill
4y ago
While true, I believe it doesn't significantly change the tradeoff between Rust and C++. Also, nothing in the post lets us infer that the author doesn't know C++11 and later.
142.
▲
by
dureuill
4y ago
I find your remark strange: the author is mainly comparing the scalability of Rust vs C. C++ does provide tools to build scalable software, and was already doing so in 1998 (few new features on this front since 98 I guess? Maybe modules, bu
143.
▲
by
dureuill
4y ago
i think the real mistake was to have "exclusive references" be called "mutable references" in the language. I've taken the habit of saying "mut" as "mutually exclusive" for references. Of course
144.
▲
by
dureuill
4y ago
a very narrow sense representing 70% of all security vulnerabilities at microsoft and google (self-reported). i'd say it's a class of vulnerabilities worth eliminating, especially when the "cost" is getting a competent a
145.
▲
by
dureuill
4y ago
exactly. if i'm writing safe rust and encounter memory safety issues, their origin is with my dependencies, and my responsibility is limited to having chosen such dependencies. In practice, this makes vulnerabilities in eg. argument pa
146.
▲
by
dureuill
4y ago
The original filenames will be lost though, if they weren't utf-8.
147.
▲
by
dureuill
4y ago
thanks, i appreciate the detailed response. I do believe, though, that "least quirky", while definitively important, is not the most deciding factor here. Axum is very young (was announced <1y ago), it has good momentum, is bas
148.
▲
by
dureuill
4y ago
signs that things might not be that easy, i'd say that the answer is rather "actix-web". axum has tokio's momentum, but a much shorter track record than actix.
149.
▲
by
dureuill
5y ago
Interesting! You're correct that it was not on my radar, don't really know why. Looking at the repository, it looks like the output is a bunch of extern "C" functions, though. Does that mean that one must call eg destruc
150.
▲
by
dureuill
5y ago
This is where I stand right now, too. I recently published an overview of Rust <-> C++ interoperability[0], and cxx is the most effective tool available IME, but OTOH even cxx is not there yet (mainly missing bindings for Option and i
More ›