by pjmlp · 1y ago · 0 comments
Although I tend to be a critic of Go's design, I love projects like these, as they make the point not everything needs to be C or C++ for game development.
Kudos for the project.
Go is compiled, Python - interpreted. Go focuses on concurrency, Python on making it easy to do things with code.
Many things that are a one-liner in Python (but itself or with a library), in Go take quite a lot of lines or boilerplate. For example, there is no built-in string templates in Go.
Or is it Python that is not best compared to "Python 4.0"? Python doesn't live up to the guiding principles of Python, such as preferring only one obvious way to do something. Go is, in many ways, more Python than Python.
> Many things that are a one-liner in Python
Case in point. Many of those one-liners are just as obviously expressed as multi-liners (e.g. list comprehension vs. traditional 'for' loop).
> no built-in string templates in Go.
Another good example. There is no special syntax, but the standard library provides. Special syntax would give two obvious ways to do it.
The only reason so many folks leave Python for Go, is the usual problem of writing C libraries instead of finally having a proper JIT in CPython, and having PyPy being largely ignored by the community.
F# can do that just fine, if the team actually cared about using .NET.
Such a strange thing to write. Mojo doesn't even have classes yet.
It is like praising Go, while ignoring CGO and and the Assembler that come with the toolchain.