An open API service indexing awesome lists of open source software.

https://github.com/nsmryan/c_traits

A toy example of a trait like system in C with examples for iterators, scans, and memory allocators
https://github.com/nsmryan/c_traits

allocator c containerof stringbuilder traits

Last synced: 9 days ago
JSON representation

A toy example of a trait like system in C with examples for iterators, scans, and memory allocators

Awesome Lists containing this project

README

          

# Traits in C
This repository contains a simple implemntation of a trait-like abstraction in C.

The code is meant to be self contained and simple, not production at all. This is
just an exploration and example for learning.

The code can be compiled manually:

```bash
gcc alloc.c -o alloc
gcc iter.c -o iter
gcc scan.c -o scan
```

See my blog post on [itscomputersciencetime](https://itscomputersciencetime.netlify.app/c-traits/) for
more project details, and see the code for the implementation details.