Hacker News new | ask | show | jobs
by 2024user 631 days ago
Without touching JavaScript but now you have to type

return h.NewPage( h.Div( h.Class("flex gap-2"), h.TextF("the current time is %s", now.String()) ) )

To me that is horrible.

3 comments

Well when you put it all on one line it doesn’t look great :)

With it properly spaced out and nested, after a few days it started reading exactly like HTML to me, where I can quickly see the hiearchy

As a developer who has worked extensively with React and Reagent (a ClojureScript wrapper around React) I actually enjoy this kind of syntax. Better that then some custom HTML templating syntax I need to learn in addition to the language.

It doesn't look too bad if one also break the code into multiple functions to make "layouts" and "components".

I have had lots of fun building with Bun, ElysiaJS, and HTMX. Might test your go library out as well. Looks pretty neat.

Awesome, yeah those are pretty nice technologies. Definitely let me know if you do / encounter any issues!
Everything doesn't have to be for everyone, and that doesn't make it bad.
This attitude would stop over 50% of disagreements.
and.. piss off another group who get their validation externally by evangelically putting down the technological choices of others.

Prejudice may not be in social areas but the same behaviour of prejudice is alive and well in justifying your own or denigrating someone else’s technology choices.

Same folks aren’t willing to be open to what is new to them in a new framework is still a 20 year old thing.

Being open to try new things is a rare state of mind and immediately disqualifies much of the population.

Having an open mind, and curious mind that seeks out new ways and experiences not something that happens randomly. You have to cultivate it in yourself and others.

I specifically said "to me"
You did, but you didn't lead with it.

Leading with it sets context before the fact.

I'm not sure what you expect out of this conversation
You still type out code? My toolkit is endless generators and macros.

I suppose bike shedding still matters to people who see themselves as Hemingway not an engineer

This is not right, there's nothing wrong with typing out code. Generators are fine, until they're not.

> I suppose bike shedding still matters to people who see themselves as Hemingway not an engineer

This is anything but bikeshedding.