Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rseacord
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
rseacord
5y ago
I like Effective C: An Introduction to Professional C Programming https://nostarch.com/Effective_C but I would since I wrote it.
2.
▲
by
rseacord
6y ago
Please submit a proposal.
3.
▲
by
rseacord
6y ago
I've heard this comment more than once. What we are trying to accomplish is to collocate the resource acquisition code with the acquisition release code. This does mean that the release code is removed when where the release occurs (f
4.
▲
by
rseacord
6y ago
Yes, you are correct and there wasn't much support for capturing values so we would probably only support capture by reference and wait to see if C solves this problem in general by introducing lambdas.
5.
▲
by
rseacord
6y ago
Based on feedback from the committee, I think it's very unlikely a dynamic approach will be used. The static only affects the for loop in terms of whether the deferred statements are run once or for each iteration of the loop, and the
6.
▲
by
rseacord
6y ago
Based on committee discussion, I think it is unlikely we will attempt to capture the values. The capture will most likely be done by reference. This case of the defer in the loop is frequently cited, probably because it is a problematic cas
7.
▲
by
rseacord
6y ago
Yes, my mistake--I was thinking of Rhode Island. I wrote a short bit about this at https://www.nccgroup.trust/us/about-us/newsroom-and-events/b... if anyone is interested.
8.
▲
by
rseacord
6y ago
Should work provided your wchar_t type is at least 21-bits wide.
9.
▲
by
rseacord
6y ago
I don't really see C going anywhere. It's not going away, and it's not going to evolve into Java. It's going to remain especially useful for memory constrained and performance critical applications such as IoT and embedd
10.
▲
by
rseacord
6y ago
For (3) mandatory warnings the closest thing is probably ISO/IEC TS 17961:2013. The purpose of ISO/IEC TS 17961 is to establish a baseline set of requirements for analyzers, including static analysis tools and C language compilers
11.
▲
by
rseacord
6y ago
Many of your remaining questions have devolved into "When will I see my favorite feature xyz appear in the C Standard?" The answer in most cases is "that depends on how long it takes you to submit a proposal". Take a loo
12.
▲
by
rseacord
6y ago
For (2) I guess it depends. Annex K is obviously already a part of the standard so it depends on the implementation. There is a push to eliminate Annex K altogether from the C Standard. If this push fails, it may be the case that more libra
13.
▲
by
rseacord
6y ago
Going to try to answer these separately. For (1) if you mean strings that are primitive types my guess is never. When had an hour discussion on this topic at a London meeting where we were discussing new features for C11 and my take away w
14.
▲
by
rseacord
6y ago
So I spend a possibly unreasonable amount of time and page space discussing VLAs in the Effective C book. I understand there are some problems with them, but for what it is worth, I really like the feature, particularly when used in functio
15.
▲
by
rseacord
6y ago
Microsoft originally implemented the Annex K Bounds checked interfaces (e.g., the *_s functions) back in the 1990s in response to well-publicized vulnerabilities. They proposed standardization to the C Standards committee. The committee m
16.
▲
by
rseacord
6y ago
I think a lot of these dudes are retired. A lot of good C people like P.J. Plauger, John Benito, and Clark Nelson have all retired recently. Anyway, they are all invited back. As an incentive, we typically have free coffee and snacks at mo
17.
▲
by
rseacord
6y ago
Some example of hardware variation (since you mentioned shifting and overflow): - signed integer overflow or division by zero occurs, a division instruction traps on x86, while it silently produces an undefined result on PowerPC - left-shif
18.
▲
by
rseacord
6y ago
I would say that there is a lot of concern in the committee about how compilers are optimizing based on pointer providence. There has been a study group looking at this. It now appears that they are likely to publish their proposal as a Te
19.
▲
by
rseacord
6y ago
Yes, we have discussed adding this feature at scope level. A not entirely serious proposal was to implement it as follows: #define DEFER(a, b, c) \ for (bool _flag = true; _flag; _flag = false) \ for (a; _flag && (b);
20.
▲
by
rseacord
6y ago
I would say that the committee does pay attention to hardware variations, even when there are no examples of existing hardware that implement a feature (for example, a trap representation for integers other than _Bool). Some of the thinking
21.
▲
by
rseacord
6y ago
Aaron Ballman even got a u8 character prefix added to C2x: N2198 2018/01/02 Ballman, Adding the u8 character prefix http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2198.pdf
22.
▲
by
rseacord
6y ago
It has not. The C Committee has taken two votes on this, and in each case, the committee has been equally divided. Without a consensus to change the standard, the status quo wins. Sounds like you don't care for Annex K. What don'
23.
▲
by
rseacord
6y ago
Uninitialized Reads https://queue.acm.org/detail.cfm?id=3041020
24.
▲
by
rseacord
6y ago
I don't know of any plans to add semantics for divide-by-zero of dereferencing a null pointer. I'm guessing this is not viable because there is no agreed upon semantics among different implementations. Making C friendlier is alway
25.
▲
by
rseacord
6y ago
Sounds like a good use of standardization. If there is existing implementation practice, please go ahead and submit a proposal. I would be happy to champion such a proposal if you can't attend in person.
26.
▲
by
rseacord
6y ago
I spent the early part of my career bragging about how many programming languages I knew, and the later part of my career complaining about how I don't know any of them well enough.
27.
▲
by
rseacord
6y ago
Well, there are number of problems with this proposal. For example, if your implementation defines int as a 16-bit type (which is permitted for by the standard) and you pass an int32_t, the value you pass maybe truncated if it is outside of
28.
▲
by
rseacord
6y ago
This depends a bunch on what your goals are. There are no specially named files, so looking for a particular filename is not particularly useful. It is sometimes informative to find the file containing the main, but not always. My job at N
29.
▲
by
rseacord
6y ago
There is always a chance. We would need to see a proposal based on experience with an existing implementation.
30.
▲
by
rseacord
6y ago
I'll pass this on to the publisher....
More ›