home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.linux.misc      Linux-specific topics not covered by oth      135,536 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 135,205 of 135,536   
   Robert Riches to c186282@nnada.net   
   Re: Python: A Little Trick For Every Nee   
   04 Feb 26 05:14:35   
   
   From: spamtrap42@jacob21819.net   
      
   On 2026-02-04, c186282  wrote:   
   > On 2/3/26 23:18, Robert Riches wrote:   
   >> On 2026-02-03, c186282  wrote:   
   >>> ...   
   >>>   
   >>>     Everybody thinks they have The Better Idea. Alas only   
   >>>     a tiny tiny few DO have that.   
   >>>   
   >>>     A kernel in Rust ? WHY ? Apparently "just because we can".   
   >>>     All the other developers are not going to suddenly learn   
   >>>     how to deal with it.   
   >>>   
   >>>     Linux soon reached a sort of "standard setup" ... and it   
   >>>     WORKS very well. NO reason to re-write everything in Rust   
   >>>     or COBOL or anything else. 99.99% of the world WON'T follow   
   >>>     you there - it all becomes just an 'academic exercise'.   
   >>>   
   >>>     "Rust" ... 'C' with an even more annoying syntax  :-)   
   >>   
   >> And, if I remember correctly from when I studied it a few years   
   >> ago some rather odd rules about when/how pointers can be passed   
   >> around.  Sometimes, it takes a lot of gyrating to declare the   
   >> pointer in the right place to satisfy the "memory safety" rules.   
   >   
   >    It's been a few years ... however I did download   
   >    the Rust suite yesterday and will fool around   
   >    with it some to see how it's come along and whether   
   >    it's worth it.   
   >   
   >    However my recollection was that if you can do   
   >    it in Rust then you can do it with 'C' just as   
   >    easily.   
   >   
   >    "Safety" ... that always complicates things. Look   
   >    into Ada, if you dare  :-)   
      
   Did a bit of web searching to refresh memory.  The term is   
   "ownership":   
      
   https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html   
      
   https://luk6xff.github.io/other/safe_secure_rust_book/memory_saf   
   ty/pointers.html   
      
   I didn't find exactly the wording I was looking for, but IIRC one   
   of the key issues is you cannot have a function that allocates   
   memory and returns a pointer to said allocated memory, because   
   that violates the rule from the first link that, "When the owner   
   goes out of scope, the value will be dropped."  Largely, it's   
   that restriction that causes difficulty when some code is ported   
   from C to Rust.  Workarounds to that restriction are required in   
   Rust that are not required in C.   
      
   --   
   Robert Riches   
   spamtrap42@jacob21819.net   
   (Yes, that is one of my email addresses.)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca