Path: ...!feeds.phibee-telecom.net!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Richard Harnden Newsgroups: comp.lang.c Subject: Re: is STC a good supplementary library for C? Date: Sat, 3 Aug 2024 13:26:01 +0100 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: Reply-To: nospam.harnden@invalid.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 03 Aug 2024 14:26:01 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b7dcb6ce955677fe01e54a275f56f886"; logging-data="3619908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18SuIq4YvTZR4UrM9mpNFSNAXcW701nM9s=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:VlPCu2EIrS3yOhI4J0RWySjnAT4= In-Reply-To: Content-Language: en-US Bytes: 1967 On 03/08/2024 11:44, Mark Summerfield wrote: > As part of relearning C I wanted to find a lightweight library (so not > GLib) that will provide generic collections. > > I seem to have found such a library: https://github.com/stclib/STC > > It does not appear to be a standard Debian package but I haven't found any > equivalent in Debian. > > Is this a reasonable choice? If not, what would you recommend? I've never hear of it, but from a very quick look I'd say: no. They seem to be trying to write C++ code in C. If you want C++, use C++. > > I want a generic (int/str/custom struct) set, map, ordered map, vector. I think this is better (I've never used it, but Jacob does know what he's doing): https://github.com/jacob-navia/ccl Really though, roll your own. It'll be a good exercise for relearning C.