Live data from Hacker News

Show HN: Fo: An experimental language which adds generics on top of Go

github.com

1–10 of 125 posts

Re: Show HN: Fo: An experimental language which adds generics on top of Go

#3

Author here. I've been working on Fo part time for 4 months. Feel free to ask me anything.

What does the implementation look like under the hood? What are the limitations of your approach (i.e. generic interfaces) and are they fundamental or just on the todo list?

Re: Show HN: Fo: An experimental language which adds generics on top of Go

#6
For generics:

How do recursive types and self-referencing types work? What about generic types that themselves require generic types? Can type constraints be applied? What do generics look like on interfaces? How about in slices? When compiled, are specialized functions written or is the code shared? How is runtime reflection for type params implemented?

Also, oblig ref of a now-defunct lang on top of Go: https://oden-lang.github.io/

Finally, good work, I hope it was fun! Don't take criticisms too seriously, they are good things (as opposed to silence) and par for the course on this site.

Re: Show HN: Fo: An experimental language which adds generics on top of Go

#8

Author here. I've been working on Fo part time for 4 months. Feel free to ask me anything.

Does this have anything in common with Go besides the language syntax? Is it binary-compatible with Go?

It seems to compile ("transpile") to Go, and then invoke Go compiler on the generated source. So I guess that would make it also binary compatible?

https://github.com/albrow/fo/blob/master/main.go#L70

Re: Show HN: Fo: An experimental language which adds generics on top of Go

#10

Author here. I've been working on Fo part time for 4 months. Feel free to ask me anything.

Does this have anything in common with Go besides the language syntax? Is it binary-compatible with Go?

Briefly looking at source one can tell it just transforms Fo into Go and invokes go run
Post reply on HN