|
|
|
|
|
by bluegatty
21 days ago
|
|
& and &mut is all over the code in Rust. &T by far the most common arg type. In the OP article, they mention 'don't need to worry about thread cause the concept does not exist' - well, & does not exist in Python. Those things are related to low-level computational issues (memory management) not problems space issues (moving money, transcoding the file, checking the spreadsheet), so a lot of &/&mut etc. and all that extra thinking slows down AI for the same reason it slows down you and I. In particular, building in rust requires us to think a bit different about how we create the program in the first place and I don't think AI is very good at architecture yet. Probably ... eventually none of this will really matter though, it will just be like 'compiler pedantry' for the small number of people who work on those things. |
|
Similarly there is an important semantic difference between something you can change and something you shouldn’t change. Again - this can be used to express business logic constraints, similarly to how you can use static types to enforce other properties like e.g. „age must be a number”.
While you may say you can get away with just sharing references everywhere like Java or JS do, and not care about immutability, that’s like saying the only type you need is string and hashmap and you can code everything. And you just document in comments when strings contain numbers. I saw code like that in PHP once. Fun.