DEV Community

Discussion on: The Peregrine programming language - A Python-like language that's as fast as C.

Collapse
 
cipharius profile image
Valts Liepiņš

The difference between Nim and Python syntax-wise is approximately same as difference between the given examples of Swallow compared to Python. Yes, variable and procedure declaration is slightly different, but type signature syntax in Nim is more similar to Python's compared to Swallow.

The main question here is why is there a need for new programming language, when a very similar, more mature project exists? It would be more fruitful to improve an already existing project and that would bring greater good to programmers looking for Python like C language.

But of course, if the project's main motivation is learning about language design, parsing, compiling and just for fun, then it makes more sense. Since developing and launching a new language is a very challenging and risky task that will take years of maintenance and improvements, and even then it most likely will not get the traction between programmers to stay alive.

Thread Thread
 
otumianempire profile image
Michael Otu

I have heard of Nim but to be honest I have not tried it. Seeing swallow, I think it is much more like C. It is as if I am writing C but sugar coated with python. I am writing C using python syntax (This sounds better). That is how I see it. I don't know much about language design, parsing, compiling or the rest but I have used python and JavaScript more as a back-end developer. So looking at Swallow (python-coated-C), it would stay alive, maybe in a small niche but it will still stay alive if it will revolve around python - for that I can say. I stand to be corrected.

Thread Thread
 
cipharius profile image
Valts Liepiņš

Nim also compiles to C, so it's same as Swallow in that manner. Besides Nim is already released language where as Swallow isn't past v1 yet.

Also Nim can compile to JS too.