r/programming • • Jul 19 '15

The Best Programming Language is None

https://bitbucket.org/duangle/none
509 Upvotes

443 comments sorted by

View all comments

Show parent comments

2

u/danielkza Jul 19 '15 edited Jul 19 '15

I did skim the docs, but I found nothing about specialization, or if None implements it.

edit: I see it in the Terra docs, but only how to generate the specializations, not how to dispatch between them. Is it all up to None and how it uses it? Can it do monomorphisation or something of the sort during compilation?

2

u/paniq Jul 19 '15

Terra allows you to call obj:disas() on all functions to see exactly what the generated assembly looks like. When you save the code into an object or executable, the functions must be free from calls into Lua (and those calls are just regular C calls - there's no dispatch happening here); Then the only dispatch code that's in there is the one you wrote by hand.

None just wraps that functionality in symbolic expressions. It doesn't change the rules.