davidatbu 11 hours ago

I don't know if it's due to my familiarity with Rust, but I find none of the examples cursed or surprising, except the "&* is useful" one. Even for that one, I think the use case of "turning a raw pointer to a reference" actually requires unsafe, and so it's imo a bit misleading to omit that fact.

All this is unlike a language i work with in my day job (and hence one would expect that I'd not find surprising), and yet I find so much behavior utterly baffling: https://dev.to/ben/what-is-the-oddest-javascript-behavior-4d...

  • ramon156 10 hours ago

    I guess the "cursed" part is that developers can make unexpected behavior happen, but what's the point? No one's gonna purposefully make a bad clone/copy.

dabacaba 20 hours ago

In Rust, if expressions are not place expressions. In the example, arr_ref is a reference to a temporary, not to an array element. In Rust, it is possible to take an address of any expression, but taking an address of a value expression will produce an address of a temporary.

atoav 12 hours ago

#00F on black is really not a color combination anybody should use in any case where accessability matters.

desdenova 9 hours ago

Cursed article by someone who doesn't know Rust.