Vasiliy Tereshkov
Vasiliy Tereshkov
Another implementation with just one `append()`: ``` fn insert(a: []T, i: int, v: T): []T { if i == len(a) { return append(a, v) } b := append(slice(a, 0, i...
@skejeton I cannot agree with you on this point. What you call an auto initialization is a widely accepted approach. C++'s `std::map` does exactly this: https://onlinegdb.com/_2_bEnIeRK. Maps in Go are...
@skejeton You convinced me to reopen it and continue discussion, though I'm not planning any immediate actions here. > In C++ std::map creates a new element on index because there's...
@skejeton Yes, that's a known problem. While Umka mimics Go syntactically, it has a different internal represenation of dynamic arrays. Instead of maintaining both `length` and `capacity`, it has only...
@skejeton I thought of this solution. However, the problem is that the LHS may not even exist: ``` return append(a, b) c := append(a, b) len(append(a, b)) ``` or may...
@skejeton @marekmaskarinec As a compromise, I could suggest a new built-in function (say, `push()`) that acts like `append()`, but adds new items in-place, without copying the whole array to a...
Recent observations: resizeable dynamic arrays cannot store `len` directly in the `DynArray` structure. It seems that we have to store a pointer to `len` instead, so we'll need to rework...
Related issue: #140
Now we have a rudimentary support for UTF-8, as the latest terminals and C runtime libraries on Windows 10 and Linux support the `C.UTF-8` or similar locale strings. String length...
@marekmaskarinec Please notice the API change: `umkaInit()` now requires `locale`, which can be `NULL`.