albrow / fo

An experimental language which adds functional programming features to Go.
Other
1.24k stars 34 forks source link

Making libgeneration available to folang programmers #22

Open go-li opened 6 years ago

go-li commented 6 years ago

libgeneration contains several generic algorithms and datastructures

It is developed in a single parametric language named go-li (suffix .go). Because folang is very similiar i did a transpiler and translated libgeneration to folang. Now every folder contains both .go and .fo files. Can your importer import such packages? Detect it's a fo package and use only fo files? Alternative solution is to put each go-li package and fo package into a separate folder. It's easy to fix this. Or I can change go-li suffix.

Come join us on gophers.slack.com channel #generics

albrow commented 6 years ago

@go-li this looks really cool and thank you for letting me know about it :)

See #2 for some background. Basically, my long-term plan for the importer is that it will look at .go and .fo files and you will be able to import other Fo packages as well as vanilla Go packages. If the .go files in your package are not actually valid Go it could cause some problems. But I will be able to tell you a lot more once #2 is implemented.

By the way, it's extremely useful to see a sizeable codebase like this transpiled to Fo. Any problems you find can probably be converted into test cases and as a result we will have a much more robust compiler. If you do find more bugs, please continue to open issues. I can't overstate how helpful it is right now at this stage of the project. Thank you!