Immutable borrows elegantly express that a value is only read, whereas move-in-move-out values change ownership and as such can be modified. Further, and more importantly, in the case that a domain moves a remote reference to another domain, which happens to panic, that RRef is permanently gone. In the case of an immutable bor- row, that reference should still be valid since it was never modified. We keep track of ownership during an immutable borrow with a simple counter. The purpose of the borrow counter is to clean up a remote reference in the case that a domain panics. A proxy lies in between each domain crossing and manages the borrow counter. It increments the counter when descending into another domain, and decrements it upon return (success- ful or unsuccessful). The RRef is only deallocated when the borrow counter hits zero and its owner domain is dead. https://users.cs.utah.edu/~aburtsev/doc/appel-bs-thesis.pdf
#Zig functions calling Zig functions could theoretically violate the system's calling convention in some ways without that causing any problems because both the caller and the callee can be compiled to work with that but if your code is expected to be called from somewhere else (like C) that must not happen
a very small fraction of UG are actually scholars , per se , eg scoring well at nearly all subjects in every semester, with special interest/ original thoughts in almost none of them, yet in some subjects they score better , as most of the class does well in them . They re well suited for higher studies and similar jobs , with a lot of ink to spill, journalism, administration you name it. exact opposite of that is , people who work a lot to score just average ( or even pass) at most subjects, but with good early at some hobby like subjects, like programming, they end up being programmers. even worse off are those with neither of these advantages, their socioeconomic background,market conditions, skills, outlook, priorities and strategy governs what they end up being. #career#education
@ramin_hal9001@anthk nonetheless here s 2c I liked The unix philosophy is quite the contrary, to keep the KERNEL simple, and deport to user space the handing of complexities that they don't want inside the kernel. (See for example interrupted system calls and signal handling, but that's another topic).
The reason why the line discipline is inside the kernel, is to avoid context switches at the reception of each character (which in the early times of small core memories, would imply swap-outs and swap-ins!). So the line discipline keeps in a kernel buffer a line of input, and since it's simple enough to test for a specific byte and decrement a counter to implement the backspace "editing" (and a few other simple editing functions), it's done there.
The alternative, is to use the raw mode, where the characters are forwarded to the application as soon as they're received, which is needed for more sophisticated editors, like the (at the time) famously known Eight Megabytes And Constantly Swapping editor (emacs) https://www.linusakesson.net/programming/tty/