General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
p11
ForrestKnight
comments
Comments by "p11" (@porky1118) on "My Experience with Rust as a Java Dev" video.
3:24 > preventing the mess in the first place Very good point. These restictions force me to structure my code better. For example when doing a graph, I don't have a bunch of nodes on the heap, who reference each other. This can lead to memory fragmentation and if I want to move a node around in memory, this will be pretty difficult. Instead I use a simpler concept and represent it as a list of objects, which are all in a continuous list, improving cache locality. They might have data connected somewhere else, but also not more than the garbage collected node. I might also just represent them as sparse matrices, which already have good and efficient implementations.
1
11:50 The "allow less by default" is something I like. I just realized that's similar to using programming langugaes with libraries. By default you have no libraries, but if you import enough libraries, you basically have something that's close to an engine. And engines allow you a lot by default, and you have to disable things you don't want manually if that's even possible, just like you have to disable mutablilty in Java.
1
5:45 Small mistake. You can have as many references to mutable data as you want. You can just have one mutable reference at a time.
1
15:10 I can relate a little. I always thought I'm smart when I was young and wanted to do things in my way. Now I know how smart I really am, and still want to do things my way, but I have to admit that sometimes it's just better to check how others do something and see if it's better. In most cases it's not. Like why would you use json or html/xml to exchange information instead of using a simple binary format? Why would you use data bases as a external tool than a program internal data struct for self contained programs? But even if most software designs are pretty bad, my programs often become worse, especially when it comes to the overall structure, and maybe using some popular approaches help me there.
1