6 ms·
I actually started writing my blog in Crystal, took a little break, and started writing it in Nim. I really like Nim a lot. Some of the code came out more conc
by ejstembler 7y ago
I actually started writing my blog in Crystal, took a little break, and started writing it in Nim. I really like Nim a lot. Some of the code came out more concise in Nim. I like how Nim handles nils better. Options instead of temp var shadowing. I would've finished my blog in Nim had I not ran into an issue with embedded-style templates. Think eRb in Ruby. Crystal handles this by compiling and embedded. Nim doesn't support that. I had to resort to something like Mustache which I didn't want to use. Ultimately, I went back to Crystal and finished it.
- nimmer 7y agoNim string templating is very powerful. What is your unmet need, precisely?
- ejstembler 7y agoI couldn't get embedded templating to work for nim. Something similar to Ruby's ERB: https://ruby-doc.org/stdlib-2.7.0/libdoc/erb/rdoc/ERB.html https://ruby-doc.org/stdlib-2.7.0/libdoc/erb/rdoc/ERB.html. Or Crystal's ECR: https://crystal-lang.org/api/0.21.1/ECR.html https://crystal-lang.org/api/0.21.1/ECR.html