Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
# the issue is the `;`
# all fail
mutable.apply x => x * x; echoMutated()
mutable.apply(x => x * x); echoMutated()
mutable.apply(x => x * x);
# but this works fine
mutable.apply x => x * x
echoMutated()
Nim Version
$ nim -v
Nim Compiler Version 1.9.3 [Linux: amd64]
Compiled at 2023-04-08
Copyright (c) 2006-2023 by Andreas Rumpf
active boot switches: -d:release
$ nim_c_current
Selected: #version-2-0
Channel: stable
Path: /home/poop/.choosenim/toolchains/nim-#version-2-0
Versions:
#devel
1.6.12
1.6.10
* #version-2-0
Description
this is valid syntax as the file runs
Nim Version
Current Output
Expected Output
the file runs, so i assumed
nimpretty
would format files according to the styleguidePossible Solution
remove the semicolon, and remember to start the project with a nimpretty githook setup
Additional Information
No response