2 ms·
Nim [0] IMO has syntax that's better than Python, while having a performance of C. See "Nim for Python Programmers" [1] for detailed comparison. Small example
by archargelod 2y ago
Nim [0] IMO has syntax that's better than Python, while having a performance of C. See "Nim for Python Programmers" [1] for detailed comparison.
Small example of Nim code (from relevant article [2]):
var gc = 0
var total = 0
for line in lines("orthocoronavirinae.fasta"):
if line[0] == '>': # ignore comment lines
continue
for letter in line:
if letter == 'C' or letter == 'G':
gc += 1
total += 1
echo(gc / total)
[0] - https://nim-lang.org
[1] - https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
[2] - https://benjamindlee.com/posts/2021/why-i-use-nim-instead-of-python-for-data-processing/