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
- Host: GitHub
- URL: https://github.com/nsmryan/c_traits
- Owner: nsmryan
- Created: 2021-04-23T20:56:09.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-04T14:24:02.000Z (about 4 years ago)
- Last Synced: 2024-01-29T10:32:31.899Z (about 2 years ago)
- Topics: allocator, c, containerof, stringbuilder, traits
- Language: C
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.