Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
duneroadrunner
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
151.
▲
by
duneroadrunner
10y ago
> You have very much failed to convince me that this is one of them. Yeah, after further consideration I'm not convinced either.
152.
▲
by
duneroadrunner
10y ago
Ah yes, that makes total sense. I suppose those that would like a nicer interface can just implement one on top. Like the proposed array_view<> and span<> interfaces.
153.
▲
by
duneroadrunner
10y ago
Yeah, maybe I didn't think the const thing through. I guess I was thinking that the benefit of using cend() is the double-check to make sure the iterator was declared as a const_iterator (when appropriate). But using "hasNext()&qu
154.
▲
by
duneroadrunner
10y ago
"Idiomatic" doesn't necessarily mean better. I think objectively it's hard to argue that "item != market.end()" is superior to "iter.hasNext()". The latter accurately reflects the programmer's in
155.
▲
by
duneroadrunner
10y ago
> So I think there is a fundamental difference between "What are the odds of rolling a six" as "What are the odds of that event happening," and "What are the odds the Sun revolves around the Earth" as a ques
156.
▲
by
duneroadrunner
10y ago
Might I suggest SaferCPlusPlus [1] as the "different approach". SaferCPlusPlus is a memory safe subset of C++. But the key is that the C++ preprocessor is now powerful enough to enable the creation of compatible safe substitutes f
157.
▲
by
duneroadrunner
10y ago
SaferCPlusPlus Description: SaferCPlusPlus is essentially a memory safe dialect of C++. Specifically, it is a library that provides, among other things, safe compatible substitutes for C++'s existing "unsafe" elements (i.e. n
158.
▲
by
duneroadrunner
10y ago
Yeah, apparently the Tor project considered those first but they weren't able to compile Firefox [1]. And they seem to be abandonware at this point. I didn't immediately find any indication of their performance costs. [1] https:&
159.
▲
by
duneroadrunner
10y ago
I see. Interesting that the Tor project and others had the same idea though. I wonder how feasible it would be to derive an "AddressHardener" from the AddressSanitizer.
160.
▲
by
duneroadrunner
10y ago
And don't forget "use-after-free" avoidance. (Although technically "undefined behavior" covers a lot.) Also, couldn't distros just provide a version of the library built with the AddressSanitizer[0] enabled as
161.
▲
by
duneroadrunner
10y ago
Another choice is SaferCPlusPlus[0]. The transition could be done incrementally and the performance would be better than, say, C#. [0] - https://github.com/duneroadrunner/SaferCPlusPlus (Note: shameless plug.)
162.
▲
by
duneroadrunner
10y ago
I agree, C++ is very versatile in terms of supporting both low-level and high-level coding styles, and the fine-grained interleaving of the two. There is indeed a ridiculous, and probably unnecessary, amount of complexity available in the l