News for hackers. Stuff that matters.
Re:Writing Python like it's Rust by nimmer on Sunday May 21, 2023 @07:29AM (#36019845)
The author should really look at Nim.
Re:Writing Python like it's Rust by mrweasel on Sunday May 21, 2023 @12:50PM (#36022688)
Isn't that more equivalent of "I really want to have a typed and compiled language, but I'd also like to keep the Python like syntax". Nim is an underrated language, it's easy to pick up and plenty fast.
Re:Writing Python like it's Rust by esafak on Sunday May 21, 2023 @04:11PM (#36024292)
The language is dandy, but it needs better tooling.
Re:Writing Python like it's Rust by kobzol on Monday May 22, 2023 @03:51AM (#36028547)
I will someday :) But unless there's Tensorflow and about a gazzillion other packages in Nim, it's not easy to switch.
Re:Writing Python like it's Rust by davidatbu on Monday May 22, 2023 @05:24AM (#36029073)
You know: this always tempts me, but I hold back because nim is not memory-safe (or has a clearly delineated memory-safe subset like Rust), and I would rather pick up an actually memory-safe (even if GCed) language even if some perf-cost (like F#, Ocaml, Swift, Vale ..etc).
Re:Writing Python like it's Rust by cb321 on Monday May 22, 2023 @10:35AM (#36031990)
There is a fairly clear subset of Nim which is memory safe. There are discussions once in a while to reduce that from a small set to one..two keywords, e.g.:

    https://forum.nim-lang.org/t/9280#61243
which has links to some others. The resolution is usually: Eh - it's already a very small set.

There also may well be libs (that you feel unable to not rely upon) which use these language constructs, and trust sure is tricky (in any PL ecosystem as well as just in life).

Re:Writing Python like it's Rust by davidatbu on Tuesday May 23, 2023 @06:49AM (#36042413)
Definitely learnt from that link, thanks!

That still hasn't won me over from prioritizing definitely-memory-safe languages over "fairly-memory-safe" nim tho.