HackerTrans
TopNewTrendsCommentsPastAskShowJobs

tourist2d

197 karmajoined 8 lat temu

comments

tourist2d
·wczoraj·discuss
[dead]
tourist2d
·24 dni temu·discuss
[dead]
tourist2d
·w zeszłym miesiącu·discuss
[dead]
tourist2d
·2 miesiące temu·discuss
[dead]
tourist2d
·3 miesiące temu·discuss
[dead]
tourist2d
·3 miesiące temu·discuss
[dead]
tourist2d
·4 miesiące temu·discuss
[dead]
tourist2d
·4 miesiące temu·discuss
1. This seems like it's be far too tricky and make C++ even more footgunny, especially with references, move constructors, etc etc.

2. Name lookup and overload resolution is already so complex though! This will likely never be added because it's so core c++ and would break so much. imo, it also blurs the line between what's your interface vs what I've defined.

3. This is every junior c++ engineers suggestion. Having ABI breaks would probably kill c++, even though it would improve the language long term.

4. Again, you make solid points and I think a lot of the committee would agree with you. However, the committee's job is to adapt C++ in a backwards supporting way, not to disrupt it's users and API each new release.

There are definitely things to fix in c++ and every graduate engineer I've managed has had the same opinions of patching the standard, without considering the full picture.
tourist2d
·4 miesiące temu·discuss
[dead]
tourist2d
·4 miesiące temu·discuss
[dead]
tourist2d
·4 miesiące temu·discuss
[dead]
tourist2d
·5 miesięcy temu·discuss
[dead]
tourist2d
·5 miesięcy temu·discuss
[dead]
tourist2d
·6 miesięcy temu·discuss
[dead]
tourist2d
·6 miesięcy temu·discuss
Your comment makes no sense. If it was designed for non-null terminated strings, why would it specifically pad after a null terminator?

I looked up the actual reason for its inception:

---

    Rationale for the ANSI C Programming Language", Silicon Press 1990.

    4.11.2.4 The strncpy function
    strncpy was initially introduced into the C library to deal with fixed-length name fields in structures such as directory entries. Such fields are not used in the same way as strings: the trailing null is unnecessary for a maximum-length field, and setting trailing bytes for shorter names to null assures efficient field-wise comparisons. strncpy is not by origin a "bounded strcpy," and the Committee has preferred to recognize existing practice rather than alter the function to better suit it to such use.
tourist2d
·8 miesięcy temu·discuss
As a c++ developer who's heard of Zig but never dived into it, I was reading this article scratching my head wondering what is it actually so unique about it.

Why the blog has a section on how it install it on the path is also very puzzling.
tourist2d
·9 miesięcy temu·discuss
[dead]
tourist2d
·9 miesięcy temu·discuss
Sounds like a problem with poor code rather than something unique to OOP.
tourist2d
·9 miesięcy temu·discuss
[dead]
tourist2d
·9 miesięcy temu·discuss
[dead]