#body_text

Invocation

f :: (a: $A) #body_text (A: ^Type_Info) -> string { <body-code> } - provide a procedure to generate source for the body of a polymorphic procedure. 1 2

See also:

Examples

Examples:

toggle example
length_body_text.jai

  1. you can have this #body_text directive that replaces this function body, and like a modify proc it takes the types and returns a string, and the string it returns is then fed by the compiler back into the compilation loop.
    “Polymorphic Procedures, part 2” YouTube, uploaded by Jonathan Blow, Apr 1, 2015, https://youtu.be/7Fsy2WaxLOY?t=2437 

  2. building a string and running the string is kind of overkill. That’s kind of big guns to bring to any fight, and a lot of time you don’t need it. Most of the time you would use [other language features]. But it’s a very powerful technique.
    “Polymorphic Procedures, part 2” YouTube, uploaded by Jonathan Blow, Apr 1, 2015, https://youtu.be/7Fsy2WaxLOY?t=2736 

jailang 2019 pixeldroid
https://github.com/pixeldroid/jailang
programming pages theme v0.5.21 (https://github.com/pixeldroid/programming-pages)