Settings

Theme

The feature in OxCaml that more languages should steal

theconsensus.dev

6 points by g0xA52A2A 9 days ago · 3 comments

Reader

weissi 8 days ago

Swift has `@_noAllocation`:

@_noAllocation func foo() -> Int { return [1,2,3].randomElement()! } fails with "error: Using type 'Int' can cause metadata allocation or locks"

but

@_noAllocation func foo() -> Int { return 1 + 2 + 3 }

compiles fine.

  • eatonphil 8 days ago

    Thank you! I've made an edit crediting you. This also led me to notice the nonallocating attribute in Clang, which I've now mentioned as well.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection