Earlier quoted context omitted.
I replaced PHP with Rust and very happy about it.
may I ask, to do what? I think they don't claim to "be web" yet [0] and I doubt you were using PHP other than serving over http? [0] http://arewewebyet.com/
Show HN: “Nim in Action” is now available
41–50 of 139 posts
Re: Show HN: “Nim in Action” is now available
#42The main problem with languages that generate C or some other language is debugging. Does Nim have a good answer to this?
It's not perfect, but for my uses it has been alright (but then I'm ususally the kind of person who prefers to use debug printing and just studying the code)
Nim also shows very nice stack traces on uncaught exceptions so that also reduces the need to fire up GDB.
Re: Show HN: “Nim in Action” is now available
#43Note: the title is misleading. The book is not available yet, only the first three chapters.
Re: Show HN: “Nim in Action” is now available
#44Could be of interest if the creator didn't self-promote the language through an aggressive tone "after a few beers" https://hero.handmadedev.org/forum/code-discussion/937-i-wou...
Re: Show HN: “Nim in Action” is now available
#45Great to see Nim getting an official book, (Dominick is almost like a co-author of Nim at this point :-). My impression of Nim is that it is what Go should have been, if language developments of the past 40 years were taken into account, so if you like the simplicity of Go's syntax, but want modern features, seriously consider Nim. I personally couldn't get over the significant whitespace, (relying on invisible chara…
Most editors can be configured to show whitespace. Either in a low contrast color to avoid creating too much noise, or toggled in/out when needed.
Re: Show HN: “Nim in Action” is now available
#46Re: Show HN: “Nim in Action” is now available
#47Earlier quoted context omitted.
I guess you are not a great fan of Python. C was my first language, so I had the "significant white space" prejudice. The first time I tried it, I was hooked - because I hate code improperly indented. Yes, you can go the gofmt route in order to eliminate indentation wars, but I love languages where the syntax enforce it: it is a very pragmatic design (no need for explicit start/end of blocks, no ";" to mark the end o…
I'd be violently allergic to the case insensitivity in a dynamically typed language where you could declare a variable with something like "foo = 1" but I'm fine with it in Nim. EDIT: s/sensitivity/insensitivity/
I agree, but my concern is not correctness, it is aesthetics.
Why? Reading a computer program is often harder than writing it from scratch, so I like when languages enforce (or at least encourage) a name convention - just to keep it easier to read. Does Nim have something like PEP-8?
Re: Show HN: “Nim in Action” is now available
#48The main problem with languages that generate C or some other language is debugging. Does Nim have a good answer to this?
Re: Show HN: “Nim in Action” is now available
#49Earlier quoted context omitted.
Rust FFI is not nearly as simple as Nim's interface to C where you pretty much just call C functions.
That's exactly Rust's FFI.
I strongly prefer Rust's safety but it's not quite the same as a blind FFI like Nim.
Re: Show HN: “Nim in Action” is now available
#50Earlier quoted context omitted.
But... generally, I would say all these languages can replace each other (well, ok, perhaps not C) given the right circumstances. Nim has one nice thing going for it - and that is very good C/C++ integration. Rust has it's safety focus and novel memory model. Go has simplicity and tooling, and popularity. Java has enterprise-focus. All have good performance.
Rust has extremely good FFI to C as well, if you were using that as a differentiation. No memory layout issues, etc like Go's issues. (Nothing against Nim, I haven't worked with it yet)