[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>only decent language I know Why does /g/ hate it

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 61
Thread images: 5

File: [email protected] (15KB, 580x164px) Image search: [Google]
python-logo@2x.png
15KB, 580x164px
>only decent language I know

Why does /g/ hate it
>>
File: 25282112?v=3.jpg (21KB, 341x341px) Image search: [Google]
25282112?v=3.jpg
21KB, 341x341px
>>59870180
snakes dude
they are scary
>>
File: 1489772906657.png (399KB, 435x556px) Image search: [Google]
1489772906657.png
399KB, 435x556px
>>59870194
this
its also why we hate lisp and why Ada is our waifu
>>
Over-reliance on indentation
>>
It's a language that exists so the language can exist, so that python developers can exist for the sake of existing. Same with every other meme language made over the last few decades.
>>
>>59870228
Indentation is fine, the code looks organized. It's what we do in other languages even if not enforced anyway
>>
Python is easy and popular, the two things /g/ hates most in software. A big part of the hate comes from CS grads resentful that it's so much less obnoxious than the language that they were forced to learn.

In the industry, where people see languages as tools instead of lifestyle choices or badges of honour, Python is overwhelmingly loved.
>>
slow and interpreted
>>
>>59870379
The question implies that you know how to use it correctly. I'm not asking why Python is bad for realtime trading.
>>
Literally this >>59870370
Anyone who works with science or does anything related to data analysis/big data can confirm. Obviously NEETs, Pajeets and code monkeys wouldn't know this, since they are never going to get that far in life.
>>
>>59870385
There's no way to use Python correctly. You can't program the next Photoshop killer or even a game in Python.
>wtf dude i don't need to, i just need to do [—————] man
then you're not a programmer sorry
>>
Duplo programming.
If you're doing anything more than scripting or plugging libraries together, Python is not very pleasant to work with.
>>
>>59870402
>you can't program these very specific kinds of heavy-on-CPU programs so this language is shit
What about something without heavy graphics
>>
>>59870379
>slow
For most applications, the raw speed of a program is not an issue, whereas developer time is often very valuable.
In certain domain you must use a more appropriate tool (e.g. Fortran for numerical modelling, C++ for gaming), and Python can't compete.
Outside of those, bottlenecks can be fairly easily taken care of with C extensions or Cython.
>interpreted
Has many advantages.
Obviously this is at the expense of performance, for which see above.
>>
>>59870402
>can't program a game in Python
Excuse me, but did you know how retarded you sounded?
Do you not realize, that the entire Eve Online was written in Stackless Python?
Why would a language limit you to wether you can or can not write a game with it? I swear, this board gets more retarded with every minute.
>>
>>59870180
/g/ hates things that are too easy, if one of these fucks admitted to learning python and someone said "Yeah, I heard that's a really good entry level language" they'd die of embarrassment before they'd hear " it also has some pretty high level applications, and learning it creates some very good job opportunities"
>>
>>59870454
>eve
>game
>>
It's pretty good.
The worst thing about it is the 2.7/3 split.

Seriously, that shit is annoying. I've been forced to run with 2.7 since the industry I'm in sticks to it.
>>
>>59870415
How? I think it scales quite nicely. I've never made huge applications with it but I think it goes beyond just scripting.
>>
>>59870463
True, but nowadays lot of the split is due to arrogance and laziness. The vast majority of popular dependencies are cross compatible, but many people in the industry are blind to the long term payoff of upgrading.
>>
>>59870180
I don't know. I'm a physicist and it's god tier for data evaluation, prototyping and scripting not performance critical stuff. And in scripting I mean replacing bash scripts that are god awful.
>>
Lack of a switch statement
>>
>>59870402
>all programming languages are made to do one thing
That's what students believe when they start their first term of CS.

Any decent sysadmin will need to know python. It's also quite used in ML due to libraries like sklearn and tensorflow.
>>
>>59870180
because it's easy, popular and slow
>>
File: larry-wall-1.jpg (107KB, 600x800px) Image search: [Google]
larry-wall-1.jpg
107KB, 600x800px
>>
>>59870465
It's not so much about the scale of applications, more the work involved.
It's hardly ideal for implementing algorithms or efficient data structures.
>>
>>59870415
>not very pleasant to work with
as opposed to what?
it's literally the highest productivity programming language in existence
>>
>>59870731
What if you could implement algorithms or data structures in other more efficient, faster language, like C or C++ and call code natively in python...
Hm... that would be great...
>>
>>59870180
Because you only know one language and don't even know it that well...
>>
>>59870180
/g/ fears the snake.
>>
>>59870180
>Python
>decent
Well, compared only to PHP and JS a lot of things look decent.
>>
>>59870180
>only decent language I know
I can see that. People who like Python like it because they have seen nothing else.
>>
>>59870180

I don't hate it, I prefer it to perl or god forgive bash+awk+sed. It's only useful as a scripting/hacking language for small projects though.

Interpreted non statically typed languages are inherently slow and insecure, convenient though.
>>
>>59870370

>A big part of the hate comes from CS grads resentful that it's so much less obnoxious than the language that they were forced to learn.

I believe CS students love for functional programming is literally Stockholm syndrome.
>>
>>59871327
I only know only Python and OOP but feel like learning the tenets of FP would make anybody a better programmer
>>
>>59871327
Nah mate, functional programming can be useful, like for writing parsers. The problem is many cucks believe it's a panaceum for all problems and try to jam it everywhere they can.
>>
>>59870910
I'm sure shitton of scientists using Python + Numpy/Scipy/Pandas agrees with you.
>>
>>59870910

This. Scripting languages are almost uniformly awful, Python just happens to be one of the better ones.
>>
>>59872888
Awful in which way?
>>
I love python
>>
>>59870180
- Global Interpreter Lock (GIL) is a significant barrier to concurrency. Due to signaling with a CPU-bound thread, it can cause a slowdown even on single processor. Reason for employing GIL in Python is to easy the integration of C/C++ libraries. Additionally, CPython interpreter code is not thread-safe, so the only way other threads can do useful work is if they are in some C/C++ routine, which must be thread-safe.
- Python (like most other scripting languages) does not require variables to be declared, as (let (x 123) ...) in Lisp or int x = 123 in C/C++. This means that Python can't even detect a trivial typo - it will produce a program, which will continue working for hours until it reaches the typo - THEN go boom and you lost all unsaved data. Local and global scopes are unintuitive. Having variables leak after a for-loop can definitely be confusing. Worse, binding of loop indices can be very confusing; e.g. "for a in list: result.append(lambda: fcn(a))" probably won't do what you think it would. Why nonlocal/global/auto-local scope nonsense?
- Python indulges messy horizontal code (> 80 chars per line), where in Lisp one would use "let" to break computaion into manageable pieces. Get used to things like self.convertId([(name, uidutil.getId(obj)) for name, obj in container.items() if IContainer.isInstance(obj)])
- Crippled support for functional programming. Python's lambda is limited to a single expression and doesn't allow conditionals. Python makes a distinction between expressions and statements, and does not automatically return the last expressions, thus crippling lambdas even more. Assignments are not expressions. Most useful high-order functions were deprecated in Python 3.0 and have to be imported from functools. No continuations or even tail call optimization: "I don't like reading code that was written by someone trying to use tail recursion." --Guido
>>
>>59873011
- Python has a faulty package system. Type time.sleep=4 instead of time.sleep(4) and you just destroyed the system-wide sleep function with a trivial typo. Now consider accidentally assigning some method to time.sleep, and you won't even get a runtime error - just very hard to trace behavior. And sleep is only one example, it's just as easy to override ANYTHING.
- Python's syntax, based on SETL language and mathematical Set Theory, is non-uniform, hard to understand and parse, compared to simpler languages, like Lisp, Smalltalk, Nial and Factor. Instead of usual "fold" and "map" functions, Python uses "set comprehension" syntax, which has overhelmingly large collection of underlying linguistic and notational conventions, each with it's own variable binding semantics. Using CLI and automatically generating Python code is hard due to the so called "off-side" indentation rule (aka Forced Indentation of Code), also taken from a math-intensive Haskell language. This, in effect, makes Python look like an overengineered toy for math geeks. Good luck discerning [f(z) for y in x for z in gen(y) if pred(z)] from [f(z) if pred(z) for z in gen(y) for y in x]
- Python hides logical connectives in a pile of other symbols: try seeing "and" in "if y > 0 or new_width > width and new_height > height or x < 0".
- Quite quirky: triple-quoted strings seem like a syntax-decision from a David Lynch movie, and double-underscores, like __init__, seem appropriate in C, but not in a language that provides list comprehensions. There are better ways to mark certain features as internal or special than just calling it __feature__. self everywhere can make you feel like OO was bolted on, even though it wasn't.
>>
>>59873023
- Python has too many confusing non-orthogonal features: references can't be used as hash keys; expressions in default arguments are calculated when the function is defined, not when it’s called. Why have both dictionaries and objects? Why have both types and duck-typing? Why is there ":" in the syntax if it almost always has a newline after it? The Python language reference devotes a whole sub-chapter to "Emulating container types", "Emulating callable Objects", "Emulating numeric types", "Emulating sequences" etc. -- only because arrays, sequences etc. are "special" in Python.
- Python's GC uses naive reference counting, which is slow and doesn't handle circular references, meaning you have to expect subtle memory leaks and can't easily use arbitrary graphs as your data. In effect Python complicates even simple tasks, like keeping directory tree with symlinks.
- Patterns and anti-patterns are signs of deficiencies inherent in the language. In Python, concatenating strings in a loop is considered an anti-pattern merely because the popular implementation is incapable of producing good code in such a case. The intractability or impossibility of static analysis in Python makes such optimizations difficult or impossible.
- Problems with arithmetic: no Numerical Tower (nor even rational/complex numbers), meaning 1/2 would produce 0, instead of 0.5, leading to subtle and dangerous errors.
- Poor UTF support and unicode string handling is somewhat awkward.
- No outstanding feature, that makes the language, like the brevity of APL or macros of Lisp. Python doesn’t really give us anything that wasn’t there long ago in Lisp and Smalltalk.
>>
What kind of application can you create with Python?

I use C#, C++, and JavaScript/NodeJS as my main languages to create cross-platform mobile, desktop, and web applications at my day job. Would picking up Python help in any meaningful way to the standard application architecture?

Where and why are you using Python rather than any other language?
>>
>>59873070

>NodeJS
Ouch.
>>
>>59870180

Its fine. Its a secondary language unless you are not a real programmer anyways.

Its good though for its thing.

This is the internet you will find people to hate anything here.
>>
>>59873038
To be fair the lisp comparison is kinda superfluous what does lisp not have?
>>
>>59870370
^
>>
NodeJS is great. Productivity is insane with it.

Everything I do in JS land is for rapid prototyping ability.

If you're ever doing some intense process (image manipulation) just split off a process and run it in C++. I couldn't be happier with the current state of Node.
>>
>>59873169
>>59873091
I tried to reply to you.
>>
>>59870822
>read two lines written by me
>makes assertions about what I know and don't know
fuck off, I've used and liked C C++ C# Perl Python and Go, you're trying to escape arguments because you don't have any
>>
File: 1453238615913.jpg (151KB, 964x817px) Image search: [Google]
1453238615913.jpg
151KB, 964x817px
As a non-programmer I try to avoid software written in python whenever possible if it's something that I intend to use often.

User experience with it suggests me that it suffers from extremely low performance.

I find it acceptable only in various scripts and applications that I use 1-2 times a week.
>>
Python reminds me of BASIC in that the things that make it simple and easy to learn are also the things that hold it back. I don't need training wheels, I already know how to ride a bike.
>>
There are three things I hate in Python:

* Significant whitespace
* Poor Unicode handling
* Python 2/3 schism

For other things it's OK, but I'd go with Perl or Ruby for scripting.
>>
>first time using python
>make a simple conditional
>"Oh I know I'll just make this a switch statement"
>asked a python programmer why my code wasn't working
>"uh python doesnt have switch statements"
>laughed at him for his funny joke
>he stares at me with his deadpanned face
>realize hes serious
>immediately uninstall and delete system 32

never again
>>
>>59870180
http://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=python3&lang2=gcc
>>
>>59873343

This always baffled me.
>Dude just use a dict instetad, it's more "pythonic"
>>
>Python is meant to be slow because we focus on ease of development instead so performance is not an issue
>Python has a GIL otherwise it would be slow due to proper locking implementations
Python everybody. Goddamn retards.
>>
>>59873341
What's with this Unicode meme ? It's perfectly supported on P3. Never really used 2.7 so can't say for it.
>>59873343
>tries using a new language
>makes assertions about the syntax instead of learning it properly
>scared as fuck because too lazy to use elif
If something as unimportant as this makes you delete system32 you probably don't use any language at all.
>>
>>59873887
Python is not "meant to be slow", it's meant to be easy to use and perfs take the second seat. Doesn't forbid trying not to intentionally make the language slower.
>>
>>59873950
>Never really used 2.7
It's shit for Python 2 and I had to work with Python 2 so far.
Thread posts: 61
Thread images: 5


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.