←back to thread

113 points markusw | 1 comments | | HN request time: 0.215s | source

Hey everyone! I just released v1.0.0 of gomponents last week. It's an HTML component builder in pure Go, with a DSL-like HTML syntax. It's been 4 years in the making, and makes it really easy to build HTML in your web apps.
Show context
kubb ◴[] No.41878237[source]
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.

replies(4): >>41878272 #>>41878351 #>>41880180 #>>41880321 #
1. markusw ◴[] No.41878272[source]
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.