You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.
new[map::key = char, +1000] m = map::make();
m.insert("hello", "world");
but its awkward, because its semantically char + tail.
it'll never work if we move to utf8
new[map::key = String, +1000] m = map::make();
will only store the String ref structure, not the actual content.
new[map::key = StringBuffer, +1000] m = map::make();
stores the entire stringbuffers tail, even if its half empty.
one solution to this is to enable dynamic tail sizes by using alloca instead of var decls for new calls,
something like
new str = string::from_cstr("foo");
could then do an strlen() to determine the tail needed is 3 bytes and alloca just that.
but i really hate it, because dynamically allocating stack has some real ugly security implications.
i can already see people copying unchecked strings from http connections and blowing up their stack
The text was updated successfully, but these errors were encountered:
this sort of works in the call assign branch
but its awkward, because its semantically char + tail.
it'll never work if we move to utf8
will only store the String ref structure, not the actual content.
stores the entire stringbuffers tail, even if its half empty.
one solution to this is to enable dynamic tail sizes by using alloca instead of var decls for new calls,
something like
could then do an strlen() to determine the tail needed is 3 bytes and alloca just that.
but i really hate it, because dynamically allocating stack has some real ugly security implications.
i can already see people copying unchecked strings from http connections and blowing up their stack
The text was updated successfully, but these errors were encountered: