Hacker News new | ask | show | jobs
by max_ 3643 days ago
Why can't someone just write another compiled language with 100% Python syntax? e.g Julia. only more general purpose.
6 comments

Because the libraries keep people on Python and you'd need to support all those too.

Edit to add, my understanding is that the flexible nature of Python makes it hard to swap out the python without implementing all the stuff that makes it flexible. In a way I guess pypy is the python you're talking about. And it does exist, and is faster, but doesn't support all libraries.

I think Nim (http://nim-lang.org/) is what you are looking for.
Is that a joke? cause I find it really funny..
why?
Nim's syntax is far away from that of Python its more like "clean" JavaScript.

I wasnt intending to be sarcastic. I apologize if so.

I think it's very pythonic.

Can you give examples?

Also, "clean" JavaScript can look like CoffeeScript which look very much like Python/Ruby, you can almost say that "clean" versions of languages tend to converge to something like that for some ppl

CoffeeScript is terrible. Full of implicit rules and magic. Python generally seems to be the opposite.
The syntax is not 100%. From variable delaration to delacring functions
There are certain differences but I wouldn't say the syntax is "far away". It's incredibly similar to Python.
That's basically Cython. Cython normally gives you 40-100% speedup over python without making any changes to the code and can often give you 10-100x speed up with some relatively minor changes to the code.
Maybe some people use Python because of the semantics. If you just replicate the syntax would it really be Python any more?
You can't separate the (full) syntax from the semantics, so he means both.
Julia is general-purpose already.
I thought they were focused towards technical computing?
That sort of focus is expressed by the library ecosystem, not the language itself. You can write any type of program you want with Julia, you'll just be doing more work if you're building something that can't fully rely on preexisting libraries. As the library ecosystem becomes broader and more mature, this issue goes away.
Cython?