3 ms·
>Sure, but there's nothing native. But why? strings are used by all programmers everyday I struggle to understand why you wouldn't want to make them state of
by tester756 4y ago
>Sure, but there's nothing native.
But why? strings are used by all programmers everyday
I struggle to understand why you wouldn't want to make them state of the art, or decent at least.
- insanitybit 4y agoC is an extremely conservative language. You don't even get booleans unless you're in C99 and import it.
- int_19h 4y agoYou do get them without #include <stdbool.h>, you'll just have to contend with ugly spellings like _Bool and _True.
- anjbe 4y agobool, true, and false as native keywords are on track to show up in C23. https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2393.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2393.pdf
- thephyber 4y ago> > Sure, but there's nothing native. > But why? strings are used by all programmers everyday Different kinds of strings can have extremely different performance profiles. A statically allocated string of ASCII (single byte) characters. A dynamically allocated string of unicode (multibyte) characters where the length of allocation is not known ahead of time is very different. C requires the developer to know the differences and knows how to deal with them treat them.
- pjmlp 4y agoBecause WG14 doesn't care about security, for them C is basically a portable macro assembler with added conveniences.