You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I would like to have also write1(), write2(), read1(), and read2() (or alike)

    This is exactly what I hope to avoid - it is basically all duplicated code, when a single read and write function that take an array will handle everything.

    If you want these functions, maybe add another module that implements them on top of the basic read/write functions.

    the API with writing without passing size(limit) and reading with size for bare metal operations looks to me as inconsistent

    It's not really - just saving space. If you're doing write(array) why should you have to write write(string, string.length)? It's not the same as C where you're dealing with just a pointer - the length of the array/string is an integral part of it.

About

Avatar for Gordon @Gordon started