baldur
baldur

“Notetaking, Tagged Templates, and How Deno is a Clear Improvement Over Node”

Project update, a small experiment, and why I like Deno

|
Embed
Progress spinner
fed.brid.gy
fed.brid.gy
@baldur

@baldur Did you rule out using nunjucks for this which already has that kind of conditional and iterative templating?

|
Embed
Progress spinner
KevinMarks@xoxo.zone
KevinMarks@xoxo.zone

@baldur Did you rule out using nunjucks for this which already has that kind of conditional and iterative templating?

|
Embed
Progress spinner
In reply to
baldur
baldur

@KevinMarks Yeah, I'm a huge fan of nunjucks, have used it for a few projects but ruled it out this time for a couple of reasons:

I wanted a template library I could use both on the server and in a worker in the browser. This library is tiny compared to nunjucks or even Eta, a similar library I benchmarked it directly against.

Also, most string templating libraries either require support for eval or that you precompile templates if you want maximum performance. That's an issue if you want to keep the option open of either deploying to Deno Deploy/Cloudflare or of locking down the security policy on the client. Precompiling is a pain.

If I were just rendering on the server, I'd use Nunjucks or something like it with no hesitation, though. It's solid.

|
Embed
Progress spinner