| ▲ | rurban 3 hours ago | |
Sure, besides those bugs, read the specs. unsafe blocks. Loud and clear. worse than in Java where the unsafeties were just in a hidden sun class. | ||
| ▲ | adastra22 an hour ago | parent | next [-] | |
I don’t know what your point is. Unsafe blocks in the stdlib isn’t a gotcha. It’s the whole point of unsafe: you provide a validated and ideally proveably correct implementation once, with a safe wrapper. It’s how everything is implemented under the hood. It’s like double entry accounting when you only have one pen and one writing hand. The system is broken if you ever write down only half of a transaction in one ledger: you always need to record both the flow in and flow out on both ledgers. Writing either one of them is an unsafe operation. But you can only write one thing at a time. So write them in pairs in an unsafe {} block, and reuse that block safely. | ||
| ▲ | marcosscriven 2 hours ago | parent | prev [-] | |
I was familiar with the concept of unsafe blocks. What I didn’t know was there were issues outside that. | ||