5 ms·
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.Stri
by 2024user 2y 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.
- maddalax 2y agoWell 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
- snorremd 2y agoAs 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.
- maddalax 2y agoAwesome, yeah those are pretty nice technologies. Definitely let me know if you do / encounter any issues!
- j45 2y agoEverything doesn't have to be for everyone, and that doesn't make it bad.
- sitkack 2y agoThis attitude would stop over 50% of disagreements.
- j45 2y agoand.. 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.
- sitkack 2y agoBeing 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.
- 2024user 2y agoI specifically said "to me"
- hadthischat 2y agoYou 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
- bilekas 2y agoThis 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.