Tag

Walter Bright

2 stories

C++26 gets contracts. The man who built them into D says they weren't useful (cppstories.com)

Contracts let a C++ function state what callers must guarantee and what it promises back. A violation can be ignored, observed, enforced or quick-enforced, chosen per build with no portable per-assertion switch, and the guide warns they are not input validation.

Walter Bright, who says he added contracts to Zortech C++ in the 1990s and to D later, wrote that they "just turned out to not be very useful". An embedded developer wants the opposite trade: checks on at the workstation, off on weak production CPUs.

🚀Tech ★ 136 · 💬 147 · Oct 16 · #dev tools#programming#C++26#D#GCC+1

Not just a headline — the discussion unpacked

The top HN threads: facts from the discussions, both sides, insider voices. Email, Telegram, or RSS.

Linux finally deleted strncpy after six years and 360 patches, and a programmer who saw it born called it 50 years late (phoronix.com)

strncpy was killed for 'counter-intuitive semantics' around NUL termination and wasteful zero-filling. The '360 patches' figure is 360 uses converted to safer calls, not 360 bugs.

The origin: it was written to copy 14-byte, zero-padded-but-not-terminated filenames out of early UNIX directory entries. It was never meant for strings.