Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

How To Implement Closures?

Name: Anonymous 2014-06-11 16:44

As I understand, closures could be unboxed using a generated trampoline, like
mov rax, qword 12345678ABCDEFh ; 10 bytes function address
jmp rax ; 2 bytes
payload times N db 0 ; closure environment


Won't that mess code cache?

Name: Anonymous 2014-06-12 2:48

_Alignas, _Alignof instead of alignas, alignof, _Noreturn instead of noreturn, _Thread_local instead of thread_local, _Atomic instead of atomic

I don't see the problem. Because none of your proposed alternatives were keywords previously the standard uses the ugly _Reserved form; if you don't have name clashes in existing code you just can include the appropriate header (which the standard also provides for) and use lower case via preprocessor macros.

_Static_assert instead of static_Assert (it is also badly designed)

It's not badly designed; it's crippled by the semantics that the rest of the language had already defined.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List