4 ms·
How about some basic hash table support in the standard library first? I know this is snarky, but ISO's priorities over the past couple decades... :(
by dmpk2k 2y ago
How about some basic hash table support in the standard library first? I know this is snarky, but ISO's priorities over the past couple decades... :(
- rishav_sharan 2y agoYep. Basic hash table. Spec out all undefined behaviour. Standardize abi. Etc. so many things to do with c to actually make it useful instead of c++ lite
- Joker_vD 2y ago> Standardize abi What's with this strange desire to mandate One True Way to implement function calls in every language implementation? If I want to use rbx/r11/r10/r9 for argument passing and return results in rdx/rsi by default and have to use @if os.LINUX and cpu.X64 import external func[[regseq("rdi,rsi,rdx,rcx|rax"), library("libc.so")]] fwrite(buff ptr, size int64, count int64, stream ptr) int64; @endif to interoperate with one particular implementation of libc for one particular OS on one particular ISA, then that should be perfectly fine.
- dale_glass 2y agoThat in no way conflicts with the existence of a standard. A standard is just a common default, you can deviate from it. And this being C the ability to do so when needed would be expected.
- klodolph 2y agoI get why people want those things but you can’t spec out undefined behavior and end up with a version of C that people want. Not sure what “standardize ABI” is supposed to mean… each platform has its own ABI, and most of those ABIs are already standardized. The standards are just not part of the C standard.
- klodolph 2y agoI would rather not: - It involves making too many decisions on behalf of users. C++ dodges the question somewhat by making hash tables templated, so you can customize them. - There are a hojillion hash table libraries out there which are written in C—just pick one and use it.
- dmpk2k 2y agoThe latter point is a very strong argument for a hash table implementation in the standard library.