Fo
Languages and libraries
programming language
SHOW HN2018
165points
124comments
#236of 2,155 in 2018
Top 11%of 2018 by points
How HN took it
CuriousMostly questions and neutral comments
6 positive, 30 neutral or asking, 0 mixed, 2 critical, out of 38 comments about the project. Thread score +0.09.
Idea: 2 for, 2 againstDesign: 2 for, 0 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Cool approach; author started writing code instead of arguing
From 2 comments
I liked certain aspects of Go, but lack of generics was a deal-breaker for me. You approached it a way better than I (and many others) did. Instead of arguing on forums you…
gtt on HNThis is suuuper cool. I've thought of doing something similar for a while, but I tried approaching it from the "generate Go" angle. I also found the Go syntax too tedious to…
weberc2 on HN
Objections
Generic interfaces not yet supported
From 1 comment
The Fo compiler parses and type-checks Fo source code and then generates and outputs Go code. It generates a unique concrete type for each usage of a generic type. You can look…
polymathist on HN
Go already has generics or they are unnecessary
From 3 comments
but go already has generics https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/
jcelerier on HNThe only time I find I need generics is when I'm prototyping things and making lots of changes. Node, Ruby, & Python are great for this. In fact, PHP's associative array is…
symlock on HNI've been working full time in Go since 2012. I've never had a use for generics.
marcrosoft on HN
Requests
Bounded type constraints
From 2 comments
Is there any support for bounded type variables? Or plans to add them?
gliese1337 on HNCan you do ad-hoc or bounded polymorphism? What about recursive types?
leshow on HN
Sum types
From 1 comment
Any plans to add formal sum types (as opposed to interface hacks)?
weberc2 on HN
Import support
From 1 comment
Hi there! I worked on something similar a while ago: a compile-to-Go superset that adds some generic functions/methods. You may have come across it:…
nemo1618 on HN
Questions
How are recursive and self-referencing types handled
From 2 comments
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…
kodablah on HNCan you do ad-hoc or bounded polymorphism? What about recursive types?
leshow on HN
Is the output monomorphized
From 2 comments
It's very likely monomorphizing the types, i.e. creating a unique type for each generic invocation.
webkike on HNThe Fo compiler parses and type-checks Fo source code and then generates and outputs Go code. It generates a unique concrete type for each usage of a generic type. You can look…
polymathist on HN
Alternatives named
Ply
From 1 comment
Hi there! I worked on something similar a while ago: a compile-to-Go superset that adds some generic functions/methods. You may have come across it:…
nemo1618 on HN
gotemplate
From 1 comment
I think parameterized packages are a great idea. It would be a light-weight way of getting just a bit of generic code into go. I made gotemplate to explore that idea…
nickcw on HN
Oden
From 1 comment
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…
kodablah on HN