BSVino / JaiPrimer

A description of Jonathan Blow's programming language, Jai
1.81k stars 81 forks source link

First class "type" #18

Closed dataPulverizer closed 7 years ago

dataPulverizer commented 7 years ago

One thing that was not mentioned in the primer was the treatment of "types" as first class programming elements. Is this still a thing? If so could I return a type from a function and could I have a dynamic array of types?

BSVino commented 7 years ago

I don't recall. He's not strong on type theory so I wouldn't be surprised if the answer is no.

resistcorp commented 7 years ago

in this demo, Jon demoes run-time type info, so it is definitely possible.

BSVino commented 7 years ago

There you go.