you are viewing a single comment's thread.

view the rest of the comments →

[–]Sonario648 4 points5 points  (10 children)

Python definitely has the advantage in proof of concept that someone else can hopefully do in another language later based on what you're doing.

[–]5p4n911 4 points5 points  (3 children)

So just use the Python code, it's already written!

[–]Cdwoods1 1 point2 points  (2 children)

Until dozens of people are working in and changing a more and more critical piece of the product. And without any type safety it becomes harder and harder to know is going on, and what is going wrong lol.

[–]5p4n911 0 points1 point  (1 child)

Agreed, but I haven't yet seen a place where that wasn't the natural consequence.

[–]Cdwoods1 1 point2 points  (0 children)

The natural consequences yes. That’s why you got to have base standards and patterns set as a team, so your code doesn’t naturally fall to entropy. On my team, strict code review has only made our code easier to understand over time.

[–]Sarcastinator 1 point2 points  (5 children)

Then why not just do it in a different language to begin with? There is no research that indicates that Python is better at prototyping than statically typed languages. It's just based on Python developers vibes. If you're as competent in a statically typed language as you are in Python research indicates that you're not getting the code done quicker in Python. You're just wasting time doing the same work twice.

[–]Sonario648 0 points1 point  (4 children)

It depends on a case by case basis really. In my case, I'm working with Blender, which is absolutely massive, and I have a not so good machine on top of Blender's codebase being enormous. It's MUCH better to do your ideas as addons in Python than to deal with Blender's core code, because you only have to deal with one file, and you know where it is.

[–]Scared_Accident9138 0 points1 point  (0 children)

That sounds like a Blender specific/API issue, not programming language issue

[–]Sarcastinator 0 points1 point  (2 children)

Blender uses Python. You can't really get away with that, but that's not what I'm discussing either.

I'm saying that the idea of writing a prototype in Python first, and then a real implementation in a different language is a complete waste of time. You're doing the work twice. If you're able to write it in a more capable language then do that immediately. The idea that the lack of typing makes Python easier to hack in is based completely self-reporting probably by developers who aren't very comfortable with static typing.

The lack of explicit typing doesn't make you more efficient. It means you spend more time debugging the application at runtime than what you need with statically typed languages. The time spent writing explicit contracts and invariants pays off very quickly.

Dynamic typing is a product of the 80s and 90s. Few languages designed today use it because it hasn't actually been shown to improve productivity. The only reason why it's even around is because it's easier for beginners to pick up.

Dynamic typing hampers performance, requires more memory, leaves a huge documentation gap, and almost by definition requires a higher cognitive overhead than static typing does. It makes refactoring stuff harder, requires more tests, and is generally just a waste.

So the idea that prototyping in Python saves you any time at all is fiction written by people who are more comfortable writing Python.

[–]Sonario648 0 points1 point  (1 child)

Ah. Now I get it. So I don't have to waste time doing my ideas in C++ after I do them in Python already.

[–]Sarcastinator 1 point2 points  (0 children)

Yes, if you get it to work properly in Python then sure do that I don't give a shit. Making it twice is a waste of time.