Global Interpreter Lock (GIL) can be a significant barrier to concurrency. Due to signaling with a CPU-bound thread, it can cause a significant slowdown, even on single processors. Reason for employing GIL in Python is to easy the integration of C/C++ libraries that usually are not thread-safe.
Name:
Anonymous2011-07-22 12:59
>>120 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.
This isn't that big a deal. Just stop making typos. (not kidding.) Python's loop scoping is retarded though. I agree with that.
Assignments are not expressions
I actually like this. Side effects always being "called out" with statements can help draw attention to them. I like assignment being an expression in C only because you do everything with side effects in C.
Quite quirky e.g. __init__. Triple-quoted strings seem like a syntax-decision from a David Lynch movie, and double-underscores seem appropriate in C, but not in a language that provides list comprehensions. There has to be a better way to mark certain features as internal or special than just calling it __feature__.
Lua's metatables. They still use underscores though O_o
>>122 Reason for employing GIL in Python is to easy the integration of C/C++ libraries that usually are not thread-safe.
Wrong. It's actually the other way around. CPython's 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, you guessed it, must be thread-safe.
>>123 There has to be a better way to mark certain features as internal or special than just calling it __feature__.
Please, suggest a better solution (no, seriously).
Name:
Anonymous2011-07-22 13:45
>>30 This isn't that big a deal. Just stop making typos. (not kidding.)
This isn't that big a deal. Just stop using Python. (not kidding.)
python's list comprehensions are the only feature where i could say "i wish more languages had this"
Ain't it's just a set-theory wannaby be hack? Guido has PhD in mathematics set theory (ABC language, anyone?), so he reused this ugly math syntax, instead of uniform map and fold, real programmers use.
I actually like this.
You like non-uniform behaviour and ugly hacks? Good for you.
Name:
Anonymous2011-07-22 13:46
>>125 Please, suggest a better solution (no, seriously).
(special feature-name)
Python's syntax, based on SETL language and mathematical Set Theory, is non-uniform, hard to understand and parse, compared to simplier languages, like Lisp, Smalltalk, Nial and Factor. Instead of usual "fold" and "map" functions, Python uses "set comprehension" syntax, which has an overhelmingly large collection of underlying linguistic and notational conventions, each with it's own variable binding semantics. To complicate things even more, Python uses the so called "off-side" indentation rule, also taken from a math-intensive Haskell language. This, in effect, makes Python look like an overengineered toy for math geeks.
>>137
I disagree, but please fuck off to the imageboards now? Don't ruin the last good /prog/ thread.
Name:
Anonymous2011-07-22 14:48
good /prog/ thread
/0
Name:
Anonymous2011-07-22 15:47
>>126
I think as long as there's a clear separation, that restricting assignment to statements is a god idea from a theoretical standpoint. Side effects should be explicitly sequenced. Sometimes in expressions it is hard to tell what will happen first.
>>147
Nah, working around it with monads doesn't count as controlled. The programmer is the one who is controlled by the system, and the manipulation is so powerful that he even thinks that he is in control of the system.
it has syntax that corresponds almost exactly to C. It uses prototype OO which is how OO should be in a scripting language. It does functional programming very well as you can see in this tutorial: http://www.relisoft.com/web/javascript.html
Name:
Anonymous2011-07-22 21:23
>>143 Python's hatred of functional programming + Python's goal of being familiar without necessarily making any sense are my least favorite things about it.
Python was meant to be the Pascal of scripting languages, always take the most simplified and generic approach, as opposed to TimToady of Perl where syntax follows no standard pattern. The little known motto for Python is that "there is usually one best way to do something"
Name:
Anonymous2011-07-22 21:31
>>157
I remember trying ActionScript implementation of JavaScript. It was a crappy Java wannabe language. Hated it from the first sight. It's full of public class Fuck { private var crap:int = 0; public function moreCrap
Hope Adobe will go bankrupt, like Sun did. Evil corpotations.
Name:
Anonymous2011-07-23 3:25
Python is just "take random familiar language features and stuff them together with a terrible implementation and a pretty syntax"