by deworms · 4y ago · 0 comments
There was even a pull request implementing this feature opened, but they claim the assigned maintainer just didn't have the time to review it yet (over 5 years!). One person can effectively stall all progress out of spite. That's no way to run an open source project.
Just look at this discussion: https://github.com/godotengine/godot-proposals/issues/2972
The way contributions are accepted (or not) is completely unrelated to the project being open source or not. It's always up to the maintainer to decide whether a feature should be merged or not. Open source projects are not popularity contests.
For a programming language, 5 years is not at all an unusual delay when we're talking about an extension to the basic syntax.
Don't like how they run it? Fork it. The maintainers have ZERO obligation to merge your PRs, especially when they don't actually agree with it.
That's the point. Lots of what Python does isn't required in a game engine and is slow.
It's basically visual scripting but quicker to produce, the whole thing is C++ underneath.
number_list = [ x for x in range(20) if x % 2 == 0]
print(number_list)
one gets to write something like this, auto number_list = std::views::iota(0, 20) | std::views::filter([](const int n) {return n % 2 == 0; });
for(int num: number_list)
std::cout << num << ' ';I'm not sure about this one, I can understand why someone might agree with some of the arguments about list comprehension making readability worse, like stated in this comment: https://github.com/godotengine/godot-proposals/issues/2972#i...
I have to agree with @pycbouh. While a lot of things python does is good, I really don't like list comprehension, especially when it becomes nested.
numbers = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print([n for sublist in numbers for n in sublist if n % 2 == 0])
# > [2, 4, 6, 8]
Not very readable, and you save what, 3 lines? Not worth.
Some might enjoy writing code like that, others might dislike it. The current lack of such functionality doesn't hold anyone back that much and therefore doesn't get prioritized. It might get introduced in the future, but when there is still lots of discussion for and against adding it instead of how best to actually implement it, you know that the time has not yet come.Personally, I enjoy both LINQ in C# and Streams in Java, perhaps more than a one liner. But again, that's a personal preference and the opinions are often split about syntax related questions.
The rewrite should make it easier to add new features now.
Also the design of Godot values ease of use and simplicity to an great degree. They are very conservative about adding new features and I think they have a point there.
Also list comprehension is an odd example, I wouldn't really rank it that highly when it comes to features I miss. More annoying for me is not having traits or interfacse. You are expected to go full in with "everything is a node" and are a bit limited when it comes to more advanced abstractions. I understand why they are reluctant adding them though and I respect their commitment to keeping things simple.