rumlang / rum

Functional language, easily extensible and possible (Lua features with LISP dialect and functional) to be embarked on software Go!
https://www.rumlang.org/
MIT License
157 stars 13 forks source link

import golang packages #81

Open avelino opened 6 years ago

avelino commented 6 years ago

example:

(package "main"
  (import "github.com/avelino/slugify")
  (print (slugify.Slugify "Example slugify")))

output:

example-slugify

We can create a keyword for this import, example goimport We were able to use all Golang's eco-system inside the rumlang, we would have many batteries included.

This package can help: https://godoc.org/golang.org/x/tools/go/loader

or

Look how it was implemented: https://github.com/goby-lang/goby/blob/83e063d807b73d7d41b6cf3875ed037def104886/vm/plugin_integration_test.go goby presentation-15

more info: https://goby-lang.gitbooks.io/goby/content/plugin-system.html