Live data from Hacker News

Show HN: Gomponents, HTML components in pure Go

gomponents.com

31–40 of 50 posts

Re: Show HN: Gomponents, HTML components in pure Go

#33
post #6

Awesome, now do it in Haskell!

There are at least two generations of libraries doing that in Haskell. There was blaze-html and then lucid afterwards to fix some monad laws.

There was also was WASH[1] way before blaze.

Given the minimal syntactic overhead and the do-syntax overload/Monad type class, Haskell is a great language to do these embedded DSLs in.

[1] http://www2.informatik.uni-freiburg.de/~thiemann/WASH/

Re: Show HN: Gomponents, HTML components in pure Go

#37
I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand.

Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, but with gomponents.Ul, gomponents.Li, gomponents.Div everywhere.

Re: Show HN: Gomponents, HTML components in pure Go

#38
post #37

I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand. Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, bu…

Yeah, the dot import made the whole thing click for this library. It’s the only use case I found for it so far though. :D

Fun fact: I got the idea from an episode of the GoTimeFM podcast, where the hosts and guests were discussing features they would like to see removed from the language.

Re: Show HN: Gomponents, HTML components in pure Go

#40
post #37

I saw the dot imports and thought “What a neat feature! I wonder why nobody uses it.” Then I googled it and saw a million articles saying how they should be avoided and removed from the language because they make code more difficult to understand. Typical gophers, can’t accept that there’s a time and place for everything and need to have a hard rule to use that applies to every single situation. Imagine that code, bu…

the import is html not gomponents, which imo is fine
Post reply on HN