HackerTrans
トップ新着トレンドコメント過去質問紹介求人

tourist2d

197 カルマ登録 8 年前

コメント

tourist2d
·一昨日·議論
[dead]
tourist2d
·24 日前·議論
[dead]
tourist2d
·先月·議論
[dead]
tourist2d
·2 か月前·議論
[dead]
tourist2d
·3 か月前·議論
[dead]
tourist2d
·3 か月前·議論
[dead]
tourist2d
·4 か月前·議論
[dead]
tourist2d
·4 か月前·議論
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 か月前·議論
[dead]
tourist2d
·4 か月前·議論
[dead]
tourist2d
·4 か月前·議論
[dead]
tourist2d
·5 か月前·議論
[dead]
tourist2d
·5 か月前·議論
[dead]
tourist2d
·6 か月前·議論
[dead]
tourist2d
·7 か月前·議論
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 か月前·議論
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 か月前·議論
[dead]
tourist2d
·9 か月前·議論
Sounds like a problem with poor code rather than something unique to OOP.
tourist2d
·9 か月前·議論
[dead]
tourist2d
·9 か月前·議論
[dead]