Comment

Comment by adwn

> There is little of needless code in standard library. And what there is, believe me, over the decades was really polished.

Wrong. Counter-example: locales [1]

Also: String handling, which is responsible for so, so, so many security vulnerabilities. The underlying cause is zero-terminated strings (instead of using start/end pairs or start/length pairs). You can't even tokenize a string without either copying or modifying it!

Also also: just a single, apologetic mention of undefined behavior. Responsible – in cooperation with over-zealous compiler writers – for so many more bugs not already caused by improper string handling.

[1] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...

parent adwn 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton