Marko Tasic Profile picture
CEO/CTO at @tangledgroup @tangledhub @dcloudrs. System architect. Software developer. Startup enthusiast. Technical consultant and advisor.
Feb 4, 2023 5 tweets 2 min read
In #colony #colang, bytes type is really not required as primitive type. str type should exist since it is unicode and mostly used by developers. However, bytes can be represented as Array<u8>. Since #colony #colang is GC'ed using Reference Counting, refcount, or RC, we can introduce special kind of references called "immortal references" and an example is `bytes: type = Array<u8>`. This should be implementation detail and not exposed to developers.
Feb 4, 2023 8 tweets 2 min read
In C implementation of #colony #colang, every object has two fields, 64bit kind and 64bit value. Which means that we spend 2 64bit registers just present single value in case of primitive values such as bool, u8, u32, u64, i64, f64. In case of GC'ed objects such as generic, array, dict, struct, union, and so on, we need indirection because these "structures" simply require more space. But in case of everything above, I think we can do better.