3 ms·
while unexplored in this article, the Nim type system is pretty nice too, particularly the subrange type, the enum and the object variants.
by nick__m 2y ago
while unexplored in this article, the Nim type system is pretty nice too, particularly the subrange type, the enum and the object variants.
- benjamin-lee 2y agoAuthor here. I love the type system. By using distinct strings to represent DNA, RNA, and protein, I can avoid silly errors while still using the optimized implementations under the hood. This is what the `bioseq` library (about two hundred lines) does [1] and I find it incredibly elegant. [1] https://github.com/Benjamin-Lee/vdsearch/blob/2045b29928f7b4ad268dbd8296b0ad3a99942e90/vdsearch/nim/bioseq.nim https://github.com/Benjamin-Lee/vdsearch/blob/2045b29928f7b4...