People coming from Python that expect a "compiled, faster" Python often find a compiled, faster language but have very weird concepts expecting that language to behave like Python though it isn't.
Nim took some inspiration from Python's syntax, but the similarity is only skin deep. The construct of the language is very, very different resulting in code that usually looks and is structured differently.
IMO going into Nim thinking it will be like Python but compiled! and faster! with types! is not a good way to approach it. It is an entirely different language altogether.
Are there ways in which Nim nudges you to structure your code in better ways than you would in Python? Are there footguns?
> very weird concepts
I'm curious, what weird concepts are you referring to?
And many random question start with “Python let’s you..” or “shouldn’t we make this more like Python” to which Araq rather consistently (and rightly) replies “no, because this is not Python”
Nim is a statically typed Python, and actually the way you can deserialise JSON is very Python-like, so I'm not sure where you got this from. Here is an example:
Python:
>>> import json
>>> j = json.loads('{"foo": 42}')
>>> j["foo"]
42
Nim: import json
let j = parseJson("{\"foo\": 42}")
echo(j["foo"]) # 42
https://play.nim-lang.org/#ix=2KpUJust to clarify: I'm not complaining. I'm happy that the compiler bugs you to do 3+int(j["foo"]) if you're going to treat it as an int. But I don't consider Nim a statically typed Python.
(Also: am a very satisfied owner of a dead-tree version of the Nim book. Thanks! Highly recommended. And dom96 is awesome in general)