I'd suggest using dot syntax whenever you want something to look like it would
in OOP, or if it's a property. For example:
var player = getPlayer("Robert")
player.kill()
# kill(player)
# ^ This wouldn't be as idiomatic since this is an action on the player,
and
Thank you, that is really helpful feedback. I have seen the "dot" syntax, I
wasn't sure of how/when to use it. So I'll look into that. Good to know about
the `error` too.
Looking at the code there are a few things I'd suggest although relatively
opinionated.
Modules imported from stdlib should be prefixed with `std/[a, b, c,]`.
proc hasURLSet(sitemapContent: string): bool =
let doc = q(sitemapContent)
let urlset = doc.select("urlset")
Hi.
I wrote this sitemap parser as a way to learn more about Nim and it's ecosystem.
I would appreciate a code review and some general feedback, if anyone has time.
Also it may be useful someone out there.
<https://github.com/coneonthefloor/nim-sitemap-parser>
Thank you,
Brian