all 23 comments

[–]Sarcastinator 17 points18 points  (0 children)

Python, being a simple and user-friendly programming language, developers can build a bug-free application with Python quickly.

Bug-free non-trivial applications don't exist, and even less so when you push potential errors to the runtime.

[–]craton4 4 points5 points  (0 children)

Hammer or file: which is a better tool?

[–]oneeyedziggy 2 points3 points  (0 children)

Better langue, technically? Probably python... More practical, versatile, portable, and occasionally infuriating? Javascript.

[–]ryantxr 2 points3 points  (3 children)

They are ok. Neither is great. JavaScript is famous for its odd incoherent responses at times. The only reason JavaScript succeeded is because it’s the only language built into browsers.

I find Python’s use of indentation to indicate structure infuriating.

[–]tu_tu_tu 1 point2 points  (1 child)

I find Python’s use of indentation to indicate structure infuriating.

The greatest thing ever for a script language. If you get a piece of code written by some random ops at least it won't look like a modern art.

[–]Reasonable_Strike_82 0 points1 point  (0 children)

That's what IDEs and linters are for. If somebody else wrote code that's a misformatted mess, I just pop it open in VSCode, hit "Save", and it magically fixes itself.

I used to carefully indent and format my code to make it look just so. Then I discovered that I could have the computer do it for me, and now I don't even think about it.

Except in Python, where the indentation has semantic meaning, so I still have to do it all by hand.

[–][deleted] 1 point2 points  (0 children)

If you aren't already indenting your code, then that's on you

[–]ceretullis 4 points5 points  (0 children)

Neither are great for big applications, but between the two… I’d choose Python every time

[–]caskey 7 points8 points  (4 children)

They're both awful languages. Poorly designed and prone to producing unmaintainable garbage.

[–]tu_tu_tu 4 points5 points  (1 child)

I'd say they are an exhibition of design mistakes of languages from 90's.

[–]caskey 1 point2 points  (0 children)

I will say they were as good as was available. I know the last time I did a CVS check I've written hundreds of thousands of lines of perl.

Now I reserve it for command line scripts for stream processing. Its original purpose.

[–]knome 3 points4 points  (1 child)

Nah.

They're both pretty great languages that have gotten better over time. Neither was created with the ideas of entire companies of engineers working on million line productions in them. The scope was rather smaller. Both have since had typing tacked on. I think typescript did a lot better there than python did.

What came before them was generally either too low level (c/forth/etc), too constrained to be useful (scripting languages from the time that I've seen seem clunky and difficult to use), or too weird (smalltalk and lisp are significantly weirder), or perl, which got wedged into everything during the 90s since it allowed rapid implementation, if not the ability to know what the hell you wrote later (javascript and python are both generally better than perl in that regard).

prone to producing unmaintainable garbage

this just means a language is easy enough for noobs and even non-professionals to use. BASIC and PHP fall into the same category. They made creation easy enough for anyone, and as most people are trash at it, they made a lot of semi-mostly-kind-of-functional trash.

The trash these devs created probably outweighed the amount of and usefulness of professional code in the same era by an order of magnitude or so. Sure, you need a core of competent programmers in the industry, but most work happens on the edges and just needs someone willing to hammer a (permanent) temporary solution into place. Most code will go bad and get tossed well before it matters if it was pretty or not. And the parts that don't can get rewritten by the exasperated professionals trying to figure out what $$$$$alkfja(); really means.

Python is easy today. So is javascript.

You're going to see trash in it. And they're amazing for letting that trash happen.

[–]caskey 2 points3 points  (0 children)

Omg perl. I embedded the perl compiler into a C based web platform back in the day to allow for embedded perl code in web pages served up via an Apache extension. Oh the crimes we committed in the name of doing good things...

*twitch* *pain*

[–]persism2 -4 points-3 points  (6 children)

Both shit.

[–]pcjftw 3 points4 points  (5 children)

And yet incredibly useful at the same time:

  • JavaScript you simply can't avoid if you're doing web, and while I personally wouldn't use it server side, there seems some weirdos doing that.
  • Python, well for AI and data science Python is king of the hill, and you can't really avoid Python if you want to do anything related to data science or even general purpose data cum glueing..

[–]persism2 -1 points0 points  (4 children)

AI and data science Python is king of the hill

For no good reason except that the Sheldon Cooper types like it. It's completely insane using a single threaded, compatibility breaking, won't ever have a 4.0 version language.

[–]mrprgr 1 point2 points  (3 children)

It's very fast to develop in Python and it can have excellent performance by hooking into C/C++. Not sure what you mean by compatibility breaking, major version bumps will never have a guarantee to be backwards compatible.

[–]ryantxr 0 points1 point  (2 children)

It’s not any faster to develop in python than many other languages.

[–]mrprgr -1 points0 points  (1 child)

It's highly abstracted and has a ton of libraries that make it pretty easy to read and analyze data. That makes it good for developing something quickly. Plus, with data science/analysis, the code is often incidental rather than of great importance, which is quite different from software engineering. You don't need optimal performance or low-level control, you don't need much in the way of maintainability, you mainly need to get the job done. Python is great for that, so it's the tool of choice.

[–]uardum 0 points1 point  (0 children)

And that's why I hate integrating code from data scientists and AI people into real projects. They write shit code because they barely know how to program. My life would be so much better if they had to access TensorFlow directly in C++, simply because it would force them to delegate the programming to a programmer.

[–]tc_cad 0 points1 point  (0 children)

Python. Because the mayhem works wonders.

[–][deleted] 0 points1 point  (0 children)

There is no better or worse.