tau icon indicating copy to clipboard operation
tau copied to clipboard

design questions on minimizing dependencies

Open matu3ba opened this issue 2 years ago • 1 comments

I am wondering, if #include <string.h> #include <stdarg.h> are strictly necessary, as we only need a few of the functions and argument handling doesnt sound super complicated either.

Can you add a comment on the other headers, what they are used for?

    #include <errno.h> // Kernel error codes
    #include <libgen.h> // regex for filter [but only contains dirname and __xpg_basename, so kinda useless???
    #include <unistd.h> // file seek
    #include <sys/types.h> // system types, but where are those used?!
    #include <sys/wait.h> // also includes features.h, pid exit status etc as process info
    #include <signal.h> // signal handler
    #include <time.h> // time

matu3ba avatar Apr 11 '22 00:04 matu3ba

Do you mean remove the includes completely, and add your own implementations only for the functions Tau uses? I'm all for minimal dependencies, but there are some sane arguments for using optimized-library functions.

That said, I'm experimenting with writing my own implementations for such library functions. I'm not going to include them with Tau for simplicity reasons, but I encourage you to check the core for my compiler which is a mini-C library of sorts. Most changes are periodically reflected in the CSTL repo for easy use.

jasmcaus avatar Apr 11 '22 13:04 jasmcaus