|
|
Subscribe / Log in / New account

A lot of good stuff in there

A lot of good stuff in there

Posted Feb 15, 2025 20:02 UTC (Sat) by roc (subscriber, #30627)
In reply to: A lot of good stuff in there by wtarreau
Parent article: New leadership for Asahi Linux

My story started pretty similarly. Began with BASIC, learned Z80 and 8086 machine code, Turbo Pascal, then Turbo C and C++. Spent decades writing C++ in increasingly larger projects. Picked up some Prolog, Haskell, ML, Java, Python and JS along the way. Was delighted to adopt Rust because it fixed the glaring issues with C and C++. Less delighted lately when I changed jobs and had to resume using C++ and use Go.

When I write C++ or Rust I often think about the code that will be produced. This still matters at times, and I have side projects (rr, Pernosco) that require deep understanding of binary code. Last week I wrote code to decode some Aarch64 instructions! But when working with large systems you have to think about a lot of things and "producing the machine code I want" is usually not the most important thing.

> why does it care about who owns a pointer to a location

Every C programmer working on non-toy software has to care about who owns the memory each pointer points to. If you don't, you drown in memory leaks, crashes, and security vulnerabilities. Rust's premise is, given the importance of this and that you have to think about it all the time, the compiler should care about it too so it can make sure you get it right.


to post comments

A lot of good stuff in there

Posted Feb 15, 2025 21:21 UTC (Sat) by pizza (subscriber, #46) [Link]

> Every C programmer working on non-toy software has to care about who owns the memory each pointer points to.

The destination of a pointer isn't always memory. Heck, I'd go so far as to say it rarely is.



Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds