Thoughts on python?

Thoughts on python?

pros: minimalistic, no semicolons, whitespace matters, snake_case, good ecosystem for scientific stuff

cons: too much "magic", strange syntax sometimes, hard to debug (this is common for all dynamic language), 2 vs 3 problem

I really hate the __keyword__ pattern. It is ugly.

>hard to debug
really?, REALLY?

in dynamic languages you very often run into errors that wouldn't exist if in static languages where the IDE/compiler can help

gay shit for noobs

C or ASM

Overall pretty shitty language that nevertheless has a good feature set to act as a console scripting or "duct tape" between other languages.

Definitely not really a fan of it, though.

it's very easy in python to detect type errors compared to javascript for example

Great for scientific stuff.

>i don't know anything about programming
>i don't program
>i just post memes and opinions i found online

Disconnect from the internet and never post again, you absolute retard.

good for fast and dirty, also good as wrapper for other widgets.

how so? i am genuinely curious.
i had the misfortune of using node.js for a large project. we used the best possible dev tooling that existed, yet we would still have to constantly deal with the most trivial shit breaking our code (casual typos and type mismatch were probably 75% of all errors, sometimes you wouldn't know until it's in prod)

Python is very annoying to deal with as compared to statically typed languages.

JS is almost the same, though I guess strictly speaking you could call it worse because it's even weakly typed you get almost all errors anyhow.

Dynamic duck typing is just such a shitty idea...

It's not good but you can't really go wrong with it if you want to do stuff.

A lot of big projects use it and even better, the standard library is fuckhuge which helps in some cases when you need to deploy some generic script to different computers, kind of like what ansible does.

>Dynamic duck typing is just such a shitty idea

and it's one of the main causes of slow execution, because you have to determine the type in runtime

yeah, I meant that javascript is much harder for detecting type bugs compared to many languages.
but using typscript or flow from the beginning will solve it

Literally the only language that's fun to write. Quick, intuitive, powerful. That it's three MS slower than autistic garbage like C is utterly irrelevant to me.

>language with devs so bad there's no official multithreading
It's fucking shit. Python dev solution to lolnomultithreading? Just call a fucking C library with computationally intensive shit. Why not just fucking write it in C from the start then?

you can use jsdoc, and have jetbrains warn you for type mismatch

It's OK. I don't hate it.

good syntax and language choices, horrible performance and compatibility btw versions

>That it's three MS slower than autistic garbage like C is utterly irrelevant to me.

Oh sweetie, if you had any idea the amount of overhead python has to make it "fun and intuitive" you wouldn't be shitting so much on C.

For what it is, it's probably the best dog in the race overall atm.

not arguing with you, just curious. What do you feel are the downfalls of GO?

Dynamic typing sucks.

Static typing without generics sucks even worse.

anybody know what the type hint for functions is?

for example:
def x(y: int, z: str, callback: ???)
....


Please help

I wouldn't say Go is at all comparable to Python regarding its use cases.

I don't program professionally, and as a hobby I have a hard time having fun with languages like Python because I feel like I'm not really doing much myself, even if you limit the number of libraries you use everything is so heavily abstracted that it doesn't feel as if you're really doing anything. I much prefer to write in C because the additional challenge of having to figure out how to implement everything with the limited standard library as you go along. Say you want to write an IRC bot in Python, even if you don't use a preexisting IRC library it has all the data structures and simple abstractions prebaked for you and in the end all you've done is implement the IRC protocol. I get that this is a good thing for productivity, but I hate it from a hobbyist perspective. It's the equivalent of being into model planes for example, and instead of getting the parts of the plane and building/painting it yourself, it arrives prebuilt and you just need to paint it.

Overall I just don't find Python "fun", even if I can see its' value where productivity is concerned.

these dubs don't lie

sucks ass and slow as dick

It's shit, has bad performance, majority of users/devs are stuck on older versions. It's the windows 8 of programming languages.

It's ok but people need to stop recommending it as a tool to "learn programming". When you learn Python all you do is learn Python, outside of the very basic core concepts nothing you learn in Python can carry over to most other popular programming languages and there are better ways to learn those.

I kind of see your point. Writing something in C from scratch is kind of what is fun to me in programming itself. But when you reach a point when the things you are programming are much more interesting and fun to you than the technicalities, you kind of learn to love Python or whatever similar interpreted language you are into. When all you want to do is implement ideas quickly and draft algorithms, then you just don't want to spend hours to get it running in C.

I wouldn't say that. Learning Python teaches you a much more modern and useful programming style than learning how to fiddle with pointers in C. I think in the end you need to learn about both sides, but I would say pretty much everything you do in 2017 is much closer to what you can learn in Python.

Why do you say nothing carries over? It's rare that I've done stuff that's only a thing in Python.

there's still interest in removing the GIL, pypy/gilectomy/pyparallel, hopefully one will catch on finally

Good for network automation, I enjoy using it.

The point is this was such a half-assed (relatively) modern language that multithreading has to be hacked onto it.

I don't know Python, but I was able to cobble a script together and use Numpy, Pandas and Matplotlib to analyse some data. The syntax was very simple to understand.

It's my quick & dirty language of choice. Except the code isn't dirty at all, it's quite readable and can be very concise without being confusing.

What is Callable.

Reading docs is hard.

>The syntax was very simple to understand
the problem is when your project becomes bigger than 10,000 or 20,000 lines or something, who cares about the language syntax except students and hobbyists? I dealt with VHDL, TeX, c/c++, javascript, python, Golang, Makefile and HTML, it's never about the syntax after the first month of using the language

Even if you type hint it as a callable, the language should let you type hint as the arguments and return type of the callable, otherwise you don't know what type it will return

Also, Hindley-Milner faggots. Learn it.

Ruby or Python for small scripts ?

ruby is a dead language, while python is a top 5 language, so guess

If you integrate something like flake8 or pyflakes with your text editor / IDE it'll usually throw warnings and errors about incompatible data types or if you're trying to call methods which don't exist.

>ruby is dead
not sure if srs
can people that don't have a job never comment again?

fuck off coraline

good one. you sure showed me

I wrote a file rename script in it that I frequently use. I don't think any other language would let me do it as easy as python, all I had to do was import os and the rest wrote itself.
Also great cause I can use the script on any OS, which is not something I could get from a bash script (writing it in bash was my original plan).
That aside, I wouldn't really use it for anything more though. It's great at what it does, and it's support for little convenient things like that seems unrivaled.

That fact that what variables are in scope at a particular point is a dynamic property of the program makes me uncomfortable. Also lambdas are borked.
Otherwise, seems pretty standard for a dynamic imperative scripting language.

ruby will be totally dead within a decade, that's for sure

Good for datashit but I hope Julia kills it off.

Nah, Go is it's true killer for actual applications. People will only use it for small scripts.

>julia killing anything

julia is soon to be nonfree and it basically irrelevant.

To be fair, having better typing than JS isn't really an achievement.

Javascript finally got me to understand christianity

Its an inconsistant and hacked together language. Its ok for learning by people who dont actually want to learn the language and just start coding by taking a quick look at a tutorial. The people who like Python are usually not programmers but people in other fields who have to use a programming language in their job, ie in biology, statistics. So it has a bunch of hand holding libraries like numpy, scikit, etc. Once you learn Python at a deep level you see that the language was just mashed together ad hoc. If you know the history of Python you would see that Guido built the language just by adding features that users who were trying out his language were requesting. Compared to Ruby the module system and scoping are an absolute mess. Syntax rules simply have to be memorized as their is no coherent design in how different syntax structures behave. Anyone who really enjoys the art of programming and want a language they can understand the entire unified design at a deep level will use Ruby. Pretty much everyone who uses Ruby loves it, but only if you take the time to learn it well.

>Terry was secretly trying to teach Sup Forums theology

>That it's three MS slower than autistic garbage like C is utterly irrelevant to me.
As someone who programs in both you are objectively incorrect

Spyder is a nice IDE for it