KeliLanguage / compiler

The compiler for Keli
https://keli-language.gitbook.io/doc/specification/
Apache License 2.0
171 stars 1 forks source link

Change the transpilation strategy for functions #6

Closed wongjiahau closed 5 years ago

wongjiahau commented 5 years ago

Instead of transpiling the types of each parameters, we should use an UUID to mark each function. Consider the functions below:

(this Int).plus(that Int) = undefined
(this Float).plus(that Float) = undefined

The transpiled code should look like:

function plus$1($this, $that) { ...}
function plus$2($this, $that) { ...}

Instead of:

function plus$Int$Int($this, $that) { ...}
function plus$Float$Float($this, $that) { ...}