Giter VIP home page Giter VIP logo

kiku's Introduction

------------------------------------------------------------
kiku
------------------------------------------------------------
Defined behavioral requirements for generic C programming
------------------------------------------------------------

Many ideas are taken from C++ and the naming convention
certainly reflects that. 
C++ is fast, but the debugging experience can be painful.

The goal of kiku is to standardize type requirements
to allow for generic programming while being easy to debug
and seamless for users to extend with their own types.

The goal is NOT raw performance. Go to C++ for that.
This is promote code reuse without suffering from excessive
code bloat and difficult to read type identifiers.

Notice of course that the casts to (void *) ditch all
notions of static typing. While this consequence is
not desirable, hopefully a malformed program will
crash extremely quickly.
All function pointers are const to reduce accidental
corruption.


**Naming rules**

Type requirements always begin with an uppercase letter
such as
    OneTwoThree
while realized types always begin with a lowercase letter
such as
    oneTwoThree

Standard type functions follow the format
    TypeRequirement_functionName(void *, ...)
where the first argument is always the address
of the type instance

Type requirements are NOT realized types.
To avoid using the same namespace,
DO NOT TYPEDEF TYPE REQUIREMENTS.

Realized types must provide a _init() inline function
that returns the same type, and a _free() inline function
that properly deallocates resources captured in _init().
i.e. all type instances must be able to be declared as
    type type_inst = type_init(...);
and deallocated as
    type_free(&type_inst);

Benchtests are specific to each type requirement.
A caveat is that different realized types often have
different _init() signatures. Thus, benchtests have s ifdef
block at the beginning to properly initialize each
type instance. New realized types wishing to run the test
must append their own ifdef section and create a new
MAKEFILE target.
This is the interim solution until something better is
found.

kiku's People

Contributors

hejohns avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.