Close

The enhanced "aligned strings" format is named aStrA

A project log for aStrA : Aligned Strings format with attributes

Developing a more flexible pointer and structure format that solves POSIX and Cs historical problems.

yann-guidon-ygdesYann Guidon / YGDES 09/13/2024 at 21:290 Comments

aStrA means "aligned strings with attributes" but it's more than that. There are actually 3 important enhancements:

  1. The attributes, as previously mentioned, help processing UTF-8 and separate it from the ASCII-only domain.
  2. The canary increases reliability and spot eventual addressing errors (involuntary or not).
  3. The dedicated stack helps manage variable-size strings without messing with the existing stack or the compiler.

All three are optional and might not be required together, you can still use the basic aligned strings format alone but soon, at least one of these three "options" becomes necessary. So aStrA is a superset that will help develop a replacement for stdio.h and string(s).h. Of course it is still compatible (to a certain degree) with the traditional functions but the aim is to provide the convenience of high-level languages while erasing the "original sins" of C. This will make the design of complex applications much easier !

To mark the change,

typedef uintptr_t aStr_t;

becomes

typedef uintptr_t aStrA_t;

Discussions