proc echoLine(): void = discard
Discard looks cool! I'm Rust I had to use the unimpl macro crate [0] to get sane error messages. It would be good if that was build in though.Nim 2.0
81–90 of 213 posts
Re: Nim 2.0
#82Seems like it kinda has Sum Types, so Nim passes the litmus test for respectable static type-system in this day and age. https://nim-lang.org/docs/manual.html#types-object-variants
Re: Nim 2.0
#83Earlier quoted context omitted.
Zig doesn’t seem to have an implementation for the TechEmpower Benchmarks but Nim does: https://www.techempower.com/benchmarks/#section=data-r21&l=y...
And I'm surprised by how terribly it ranks – basically dead last against everything, even the Python frameworks, which is impressive.
Re: Nim 2.0
#84Looking forward to trying out this release! After programming professionally for 25 years, IMO Nim really is the best of all worlds. Easy to write like Python, strongly typed but with great inference, and defaults that make it fast and safe. Great for everything from embedded to HPC. The language has an amazing way of making code simpler. Eg UFCS, generics, and concepts give the best of OOP without endless scaffoldin…
Contact info?
Re: Nim 2.0
#85Been happily crunching away at Nim in production. I'm working on what is mainly a data analysis and report generation tool, compiled as a CLI executable that gets called by server scripts. Nim makes fast, small executables. It has an excellent heterogenous JSON data structure and a good dataframe library. It prefers the stack so strongly that dynamic data structures (sequences and tables, basically its lists and dict…
Re: Nim 2.0
#86Looking forward to trying out this release! After programming professionally for 25 years, IMO Nim really is the best of all worlds. Easy to write like Python, strongly typed but with great inference, and defaults that make it fast and safe. Great for everything from embedded to HPC. The language has an amazing way of making code simpler. Eg UFCS, generics, and concepts give the best of OOP without endless scaffoldin…
It really is a nicer, better Python. And I say that as someone who does like Python.
Re: Nim 2.0
#87Earlier quoted context omitted.
Agreed, only being able to put pointers on the stack, no data, would make me think it "prefers the heap".
Types are stack allocated by default. "var data: MyObject" is on the stack. "var arr: array[1000, MyObject]" is allocated on the stack sequentially. Only dynamic seq or ref types use the heap by default.
Re: Nim 2.0
#88Seems like it kinda has Sum Types, so Nim passes the litmus test for respectable static type-system in this day and age. https://nim-lang.org/docs/manual.html#types-object-variants
When I looked at it a few years ago, the compiler didn't prevent you from accessing fields from the wrong variant, and didn't provide exhaustivity checks. So I think it still falls short of this (excellent) litmus test :/
Re: Nim 2.0
#89One thing I'm also lucking is out-of-the-box interop with C/C++ libraries without creating own adapters (so that you can just import header and be done with it).
Another thing is I wish it had similar easy interop with Rust - just to increase adoption and also because in Rust easier to find high quality cross-platform crates (including mobile) that work without hassle even on mobile devices.
I worry in few years either Python will catch up (because of faster python, non-GIL, nuitka, briefcase for mobile etc) or Mojo will eat Nim lunch.
Re: Nim 2.0
#90Looking forward to trying out this release! After programming professionally for 25 years, IMO Nim really is the best of all worlds. Easy to write like Python, strongly typed but with great inference, and defaults that make it fast and safe. Great for everything from embedded to HPC. The language has an amazing way of making code simpler. Eg UFCS, generics, and concepts give the best of OOP without endless scaffoldin…
How does that work? What i mean specifically is how convenient is it to use js interop in dev time, and not just compile nim to js as a standalone lib?
Can we simply call something like browser API directly from Nim (Or with fairly simple wrapper)?