>>106714470its not a great programming language, but its a great tool
>>106714470It certainly does. Love me some Python.
>>106714470i cannot understand any scripting language. i mean, where the fuck is the main function?
yea it's comfy but sucks that microsoft's lsp is properietary
>>106714470>no static typingI can live with it I guess
>>106714523It's optional.#!/usr/bin/env python3def hello(greeting='Hello, world!'): print(greeting)def main(): hello()if __name__ == '__main__': main()
#!/usr/bin/env python3def hello(greeting='Hello, world!'): print(greeting)def main(): hello()if __name__ == '__main__': main()
>>106714529Then don't use it
>>106714523main functions are largely pointless. if you're in a situation where you need one just define one. honestly of all the gripes people have with python this might just be the dumbest I've heard in a while.
>>106714662debugging scripting langs is literally a cancer if you try to develop a serious software with them. have you tried?
>>106714694also performance issue of course
>>106714477I've made good looking gui apps with it.
>>106714694use enums, and type hint everything. Put validation everywhere. Log debug everywhere. Seperation of every piece of logicthere you have it, problem solved
>>106714645I don't but I'd like to, I complain because it doesent't work on VSCodium even
>>106714470Anyone bother with type hinting?
>>106715154You're talking about Pyright, right? Isn't there a "community" version or mirror you can install with pip?>>106715168Always whenever I write Python.
>>106714470>it just worksliterally unusable before uv was a thing>virtual environments>poetry>pipx>anaconda>jupyter notebooks>docker as a dev envtruly dreamt up by the criminally insane
>>106715168yes because if you make a variable call "file" and you don't type hint its ambigous. It may be refering to a filebyte object, string, Path etc...
>>106714523in pythons case it's the first line you write that is not a function
>wrong version of python>dependencies are not compatible with others>pip removed working version and installed some other versionMost of the time I try to run python projects, they don't work.
>>106714470give it a year or two, and chances are the same code will not work.python is literally the worst mainstream language in that regard.i've been burnt by this myself because i decided to use a python-based build system for one of my projects, and a random python update broke it (might have been 3.12).
>>106714470I only use python for simple tasks like decoding hex values, quick math, and cleaning up directories. What do you guys actually use this language for?
>>106715624its where most of the ml libraries are at sadly
>>106715565you should never use update obsessed software, that's always a red flag
Python is a scripting language, and you make scripts with it. if you are using it to develop a website, no matter what framework, you are retarded
>>106715973So the people who develop Instagram, Reddit, Pinterest are retarded? lmao
>>106716082exactly. python is pretty slow and if all of these were made in a proper language then they would be faster. i guess all of these companies have millions of $$$ so they can afford python being shit.
>>106716082NTA, yes. Personally I think its a hindsight thing. When they developed those things, dynamic typing were new and likely all the rage and fast for prototyping. These days its proven to be shit
>>106716114it doesn't matter, spa websites are slow by convention
>>106714470It's shit but companies have invested several countries's GDP worth of money into making libraries for it (yet they had to rely on some literal who's startup with a Rust toy to fix the atrocious package management) so you have to use it. Be either Tensorflow or Puppeteer or Spark, or whatever.
>>106716114>>106716176What projects have you built where python performance was not enough, how many concurrent users did you hit?. No docker/kubernetes, just python and a web server.
>>106716176>SparkJust use Scala bro
>>106716213Isn't about performance is about maintaince. Like 90% of the time where performance matters Python is an API to call a C or C++ or FORTRAN library where everything important is being computed, you won't ever hit a bottleneck by the language itself if you use it for CRUD operations either, but Python code ages poorly. 6 months for now a project may need a rewrite.
>>106716276so, you haven't built anything lmao.
>>106716213I don't want to waste my server's resources to begin with, no matter the userbase.
>>106716398>>106716368
>>106716426I don't want to waste my server's resources to begin with. Let me repeat that- to BEGIN with. Even if I have 300 users, I still don't want to code it in a shitty slow scripting language.
>>106716458have fun building your 10 concurrent user app in c++ kek
>>106716826Why would I ever use C++? PHP is dead simple to write. I could also use Ruby if I wanted. These languages are a good compromise between the shit that is Python and writing C++.
>>106716876>ruby>phpyou don't even know what are you talking about kek
>>106716938PHP is faster than python, you don't know what you are talking about
>>106716964enjoy getting pwned
>>106716876>good compromiseits a different flavor of shit and just as hard to maintain
>>106717012>php is insecureif you are using PHP 5.6, yesif you are using 8.4 and you aren't writing shit code, then noin fact, the site you are using right now runs on PHP, and it only went down because it was using PHP 5.6.
awful language all around
>>106714470the the only good thing about Python is the syntax in the imperative part of the language. the OO syntax is shit. the double underscore syntax of the built in functions looks like shit. Guido purposely left out any usable functional programming featuresPython has the worst package management system ever, I dont see how any intelligent person can take pip and venv seriously, its horrible to work with.Python is just a toy language that hooks people with deceptively simple looking syntaxits an out of date language that can never be upgraded or fixedits slow as shitanyone with any kind of intelligence has moved on to Julia
>>106715973You use scripting languages to write websites(or any other i/o bound app), you nigger. What is JS? PHP? Ruby? Scripting languages... You're the dumbest, most retarded gorilla nigger I ever seen.
If I ever have to work for food and do webdev again I'd rather work on the most boring Java project than any Python/Django hell. It's that badhttps://www.youtube.com/watch?v=3cNeatFn3q0
>>106717762you shouldn'tmaybe js but only because google spent a fortune making a fast runtime for itphp is fully retarded, ruby is the slowest language ever to exist, python is second slowest
>>106715208no, Pyright works. MS builds on top of it
>>1067151323d or 2d? what lib do you use?
>>106714470it werks but terribly
>>106717906this. pretty much the idea guy lang but can't make a proper application
>>106717891PHP le fast scripting languagePython le slow scripting language
>>106715234What's a good language that got a sane dev env on their first try? Aside from C
>>106718715>sane dev env>CC has no package manager, nor dependency management. It effectively and practically does not have any "dev env".
>>106718715Go and Rust are pretty ok
>>106717852Years of programming language development and Java is still the most preferrable choice
>>106714529>>106715208>>106717898https://docs.basedpyright.com/latest/thank me later
>>106715145It doesn't solve the issues. Type hints are comments, and logging happens at runtime, meaning at best you can react to it after an issue has already occurred, and this assumes your co-workers followed logging best practices which we can safely assume they did not considering they chose to use python for a mission critical codebase. Then, after all of that, you still have to rebuild and redeploy.I prefer to catch issues at compile time during my working hours instead of at runtime when it's 3am and I'm in bed.
>>106718884>Golmao
>>106720385copelsp is a thing, mandate its usage or you deserve the suffering the lack of it causes
>>106720385I think you're supposed to write so many tests that the odds are decent that you'll catch an obvious type error when running the tests.Yes it's far more work than just using a real, compiled language in the first place. No it's not 100% or even close to it. Yes you can still have breaking issues at runtime after deploying. But that's Python, it's shit.But it does just work, if you don't care about any of those things.
>>106715234>uv>poetryyou don't need any of these just make a virtual environment and a requirements.txtand then you make a virtual environment in prod and install the requirements from the txtsimple as fuckpoetry and uv are useless bloat and no wonder you hate the language if you started with poetry which adds tons of complexity for no benefit
>>106720731breddy much dis
>>106717367based, so based, i have to expand:>he the only good thing about Python is the syntax in the imperative part of the language.no, this also sucks, tabs as indent make lambdas useless (lol one line lambdas). It also means it isn't quick to move or copy/paste code around. >the OO syntax is shit. the double underscore syntax of the built in functions looks like shit.Yes, moreover, they have added a TON of features to python over the last 10 years yet they haven't add private/public to it, relying on that abomination of underscoring everywhere. >Guido purposely left out any usable functional programming featuresGuido simply doesn't know enough about programming languages, it shows on the bad decisions in Python>Python has the worst package management system ever, I dont see how any intelligent person can take pip and venv seriously, its horrible to work with.>Python is just a toy language that hooks people with deceptively simple looking syntax>its an out of date language that can never be upgraded or fixed>its slow as shitthis is amazing, even with PyPy (JIT) it still runs slow as shit>anyone with any kind of intelligence has moved on to Juliaor elsewhereI have over 30 years of programming experience, one year professionally writing Python code, at the beginning it looks like a nice language until you hit frontally with its bullshit.
>>106715145>and type hint everything. the problem is that those type hints won't speedup your code, while on a proper language, type declarations are there not just for type checking, but also to allow fast code execution>Put validation everywhere.beside the type declarations? lol
>>106715550My gripe exactly. Then I get roasted for not telepathically knowing that a project uses conda or some fucking glowie dependency "soooolver" kek. This entire ecosystem is niggerlicious. Almost everyone I know who uses python and only uses python is either a massive skiddie or an insufferable faggot who has never created more than a write-only project.
>>106714470This entire thread just confirms my belief even more that python is a scam. Python forces you to make write-only projects that are unmaintainable and is hard to find collaborators. Goodluck to insufferable faggots who expects others to telepathically know they have to use conda side-by-side with an install of a package that is only available using pip. This is a hill I will die on and I'm glad I learned julia before being jedi mindtricked by institutions who force python into people. Institutions who have not a single idea python causes more problems than it solves.B-bu-but python has a rich ecosystem!Exactly. That's the problem. Everyone uses different ways to do the same thing because most big packages used are maintained by companies. So people are just divided how to do a certain task which is stupid. Also, each one of those packages require you to do some parkour and disgusting hack to setup properly. They casually do a little upgrade here and there then everything suddenly breaks.Building something, anything on python is like trying to carefully place glass walls to make a glass house. Fighting for it is like throwing stones while living in your fragile glass house.Literally no common person can create a python project they will use daily aside from simple scripts. Those scripts are simple data processing for example. After 6 months they will realise the shitfuckery they brought upon themselves because the packages they relied on suddenly don't work anymore. I hope every python "developer" wakes up, experiences epiphany and moves on to more sane languages that are actually user-friendly instead of posing as one.Just try any python project right now. Go to github and download something. No dockers allowed faggot Try to run it. You will need to spend 30 minutes to an hour of fixing dumbass dependency issues that shouldn't have been there in the first place.
>>106717367>1 based indexingdropped
>>106715145>>106714694>>106714523Pajeet detected.