Live data from Hacker News

Rust – What made it “click” for me (Ownership and memory internals)

deavid.wordpress.com

11–20 of 76 posts

Re: Rust – What made it “click” for me (Ownership and memory internals)

#15

Ownership is a time-wasting idea; an object should be freely able to go anywhere in the program you need it to go without any concerns.

Ownership sure saves a lot of time for the computer when it runs the final binary.

For some software (eg browsers, operating systems), time spent making our programs correct and fast is worth the effort.

Re: Rust – What made it “click” for me (Ownership and memory internals)

#16

Ownership is a time-wasting idea; an object should be freely able to go anywhere in the program you need it to go without any concerns.

A new conception of software freedom: free from the constraints or considerations of reality. Where it’s not the code that’s unsafe, it’s the thinking about and addressing its safety that’s harmful. Kill your gods but don’t let the compiler ever figure it out!

Re: Rust – What made it “click” for me (Ownership and memory internals)

#17

Ownership is a time-wasting idea; an object should be freely able to go anywhere in the program you need it to go without any concerns.

Why do you think Rust has been such a success?

It has not a success. Just aggressive ads.

Re: Rust – What made it “click” for me (Ownership and memory internals)

#18

> As said earlier, C++ developers have an advantage on understanding Rust because they have a mental model of what the memory looks like, pointers and so on The immeasurable success of Rust certainly lies in its clear communication and forcing developers to learn about the basics of hardware. I can't help but to feel validated in thinking that every developer worth its salt should know about these basics anyway. But…

I'd learned "basics of hardware" by programming old CPUs and MCUs in assembly and machine codes. No I did not have CS background. Masters in Physics instead.

Memory management in C was too high level at that time ;)

Re: Rust – What made it “click” for me (Ownership and memory internals)

#19
post #17

Earlier quoted context omitted.

Why do you think Rust has been such a success?

It has not a success. Just aggressive ads.

All the big tech companies are using Rust in one way or another. What other recent language can claim that?

Re: Rust – What made it “click” for me (Ownership and memory internals)

#20
post #9

> As said earlier, C++ developers have an advantage on understanding Rust because they have a mental model of what the memory looks like, pointers and so on The immeasurable success of Rust certainly lies in its clear communication and forcing developers to learn about the basics of hardware. I can't help but to feel validated in thinking that every developer worth its salt should know about these basics anyway. But…

> not everybody comes with a CS background. Something doesn't sit quite right with me to describe the "basics of hardware" as being something that comes with a "CS background". I come from a formal CS background, and we spent more time dealing with finite state automatons, programming language theory, and other aspects of abstract computation. Getting down and dirty with data sizes, system components, and bit fiddlin…

I have a funny relationship with this. I also come from a formal CS background too. The old joke is that there are two lies in Computer Science: firstly its not science, and secondly it isn't really about computers.

But the reality is, I still can't tell you what Computer Science actually is. Is it:

- About understanding how to control computers (which are fast electronic machines)

- About inventing programming, from the ground up. (A weird sub-discipline of mathematics and category theory)

or

- Learning to make software in order to improves the lives of humans

We sort of need to learn all three aspects. Haskell programs run slower than C++ programs because haskell isn't written in harmony with the physical CPU cores we've made. Making fast programs is pointless if our software doesn't solve user needs. And solving user needs are impossible if we can't express ourselves clearly to the computer - which programming language theorists are obsessed with.

I think the basics of hardware is part of CS, but maybe a CS undergraduate degree doesn't give anyone enough time to really go broad in the field. I dunno!

Post reply on HN