Earlier quoted context omitted.
Do you mean compile times for Nim or a project? It's accurate to test it yourself since it's free.
Projects of any note are notoriously hard to test for yourself since they often use build systems. Golang is nice in this respect, pretty easy and fast.
Nim: Scripting Ease in a Compiled Language
111–120 of 169 posts
Re: Nim: Scripting Ease in a Compiled Language
#112One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...
Re: Nim: Scripting Ease in a Compiled Language
#113One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...
Re: Nim: Scripting Ease in a Compiled Language
#114One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...
Case insensitivity is a feature and it's meant to allow easy interfacing with C.
And it also encourages clean code.
With other languages you can have variables called "startdate", "start_date" and "startDate" in the same scope leading to bugs - especially when using completion in an editor - and poor readability.
In Nim the compiler tells you that you are redefining the same variable in 3 different places and you can go and give them more meaningful names.
Re: Nim: Scripting Ease in a Compiled Language
#115Looks cool already but is it easy to cross-compile? I can copy a Python script from my Linux machine and run it on both Mac and Windows PCs. Can Nim build executables for other platforms nearly as easy?
It also targets C, C++, Objective-C and Javascript, making it possible to run on platforms where using C is not the preferred choice.
Re: Nim: Scripting Ease in a Compiled Language
#116What're compile times like?
For me, I'm seeing compile times averaging around 5-10 seconds, with outlier builds taking up to 40 seconds if the files in question aren't cached. It feels faster than Go, but I think part of that is down to Nim's compile output being verbose by default.
Re: Nim: Scripting Ease in a Compiled Language
#117One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...
This. I like many of the things that Nim is doing, but I refuse to take it seriously if it's going to make basic things like tag search and grepping difficult. inb4 a Nim linter is written to force a consistent naming style throughout a codebase.
Re: Nim: Scripting Ease in a Compiled Language
#118Earlier quoted context omitted.
> for example, it is very natural to name them "a,A,b,B" And just to clarify once again, since I'm not sure who will read which reply: those are NOT the same identifiers in Nim! let a = 11 b = 22 A = 99 B = 88 echo a == A # false echo b == B # false Run the code in the Nim Playground if you don't believe: https://play.nim-lang.org/#ix=20kr
great! then I don't really understand nim's case insensitivity rules
Re: Nim: Scripting Ease in a Compiled Language
#119Earlier quoted context omitted.
Sounds like a nightmare.
Sounds like a pointless misfeature that will only generate mandatory "do not @#$$ do this" entries in future Nim coding style documents, and Nim linting programs that find and flag abuses. The motivation is good, if the intent is to get rid of ___unwanted___crap___ like this. But if I, as a language designer, wanted to ban such identifiers, I would just go ahead and ban them, rather than making them equivalent to one…
Nim does not allow variables starting with underscore.
Also, the compiler errors cannot if any of "useHTTP", "usehttp" or "use_http" is acceptable or unwanted, but it can error out with a clear warning if you are trying to define different variables with those names in the same scope.
Re: Nim: Scripting Ease in a Compiled Language
#120One thing I find annoying about Nim is the case insensitivity [0]. There was no strong reason for this "feature" and literally no mainstream language does it. Moreover it makes code search a pain. [0] https://nim-lang.org/docs/manual.html#lexical-analysis-ident...
It's not just case insensitive, it's underscore insensitive. So MyNimName, mynimname, MY_NIM_NAME, My_Nim_Name, __MYNIM___name_, and any other variation you can think of are all the same name! Most search tools have the option of case sensitive or insensitive search, but a search that does that and ignores underscores? Not too many of those outside the Nim world. An interesting contrast is Nim's policy on tabs and sp…