Comments by "k98killer" (@k98killer) on "No Boilerplate"
channel.
-
34
-
32
-
29
-
15
-
5
-
5
-
I might be mistaken, but the newest Wasm standard being currently rolled out supports a garbage collection mode that does not require bundling a garbage collector. Wasm looks like it will be the new, universal platform target for compilers -- basically fulfilling what Java wanted to do. Also, the Go dev team is currently experimenting with arena allocations, which will significantly improve the control programmers have over memory management, but, even without arena allocation, it is possible to manually manage memory in Go to some extent for performance optimization -- it is tricky, but still a lot easier to get a handle on than Rust RAII imo. The greatest strengths of Go are the mild learning curve and excellent concurrency model. The greatest strengths of Rust by comparison are more consistent performance for large applications, good performance on resource-constrained/embedded systems, and the ability to tell people that you write code in Rust.
4
-
3
-
3
-
3
-
3
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
2
-
@NoBoilerplate I'll check out that video. I write primarily typed Python, use pre-conditions and sometimes post-conditions, and use a test- and specification-driven development cycle, so I don't worry much about things being broken. And like I said, the idea of my code being clean and beautiful is reinforced by feedback I have gotten from others who have perused it, so the assertion that nobody will agree with my definition of beauty in this case is false. Maybe there is an argument to be made that Rust development saves time on writing pre- and post-conditions, but whether that offsets the time commitment to learning a new language when I'm already proficient in the three or four that I regularly use is an open question.
I can appreciate that there is beauty in that Rust example, at least conceptually, but I wouldn't call it "objectively beautiful" since there is no such thing. Whether or not it is aesthetically appealing also depends upon the surrounding code in my opinion -- part of what makes my code clean is that I use standardized forms that are easy on the eyes (pep8 with my own subjective flare).
The ".collect::<Vec<i32>>();" to my eyes does not look particularly clean and beautiful -- it looks like someone copied and pasted html and JavaScript in a confused and haphazard way, but that could be my web dev background coloring my perspective. I also found Java code distasteful for the same reason. Angle brackets are just ugly unless padded with whitespace, and they only make sense as comparison operators in that case.
2
-
2
-
2
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
1
-
@NoBoilerplate The GIL is definitely an issue for concurrency/multithreading, but performance is slowly increasing, and there are options for gaining additional performance with PyPy, Cython, Numba, lru caching decorators, etc. It's more work and detracts from the allure of pure Python, but if performance is a big issue, then better performance can be achieved with a bit of additional effort.
Just as a random thought, I wonder if a new Python interpreter/JIT could be made with Rust that makes use of Rust's memory management. Would it be compatible with CPython? Would it have improved performance? Could it do away with the GIL? And if the answer to all those is "yes", would you be less disillusioned with it?
Edit: what are your thoughts on the multiprocessing library?
1
-
1