Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • What Are Some Faults In Pythons Language Design?

    • 0
    • 0
    • 0
    • 0
    • 4
    • 0
    • 0
    • 0
    • 7.90k
    Comment on it

    None of the language / software / framework is 100% efficient. It indicates that the features are prone to changes to carry improvement over the existing one. As like any other languages, Python has some of the faulty language designs which are being checked and improved under shadow of python development Services

    Some faults in Python language design

    1. Lambda functions take expressions only, which strictly limit their efficacy. It is not possible to print without writing a packaging for print. It is also not possible to use an if-statement if you must be a ternary conditional operator. This makes more advanced uses of lambda difficult or impossible.
    2. The GIL (or Global Interpreter Lock) is a nasty design issue which forces Python byte encryption execution to go through an explicit interpreter lock while executing on simultaneous kernel-level threads. The origination of GIL is because Python’s memory allocation was not thread-safe, but they slowly grew into a larger problem as add-on to python began to rely on the GIL’s behavior.
    3. In python, arguments are initialized when function is defined not during each execution leading to issue in case argument is mutable. For example, dictionary or lists; in which case it behaves like a static variable existing over all call to that function.
    4. Python generally distinguishes between expressions and statements. In Ruby or JavaScript, almost every statement is an expression. In python some things that don’t have a value are, functions definitions and the related assignments. Thus Python lack real lambdas and there is probably no possible way to override the assignment “operator”.
    5. Python lack the tail recursion, which makes the practitioners of functional programming frown. “Batteries” included in Python seems like a terrible idea in an era when it is so easy to install third-party modules. The standard library is full of crufty, poorly designed and cobbled together APIs. Many still prefer a “Batteries not included” python.

    Some prominent faults include: Unicode handling, threading, and inconsistencies within the language, Pthreads with a GIL, lack of tail call recursion, urllib, circular imports and reference counting. In python, *args and **kwargs are often abused. It is also said to contain half-baked language features.

 4 Comment(s)

  • @Laitkor> Lambda functions in python make a calculus and calculation part easy, and to reduce the code.
    we think and know  the lambda is a better choice in this situation because the def double seems almost disconnected from the map that is using it and its helps more when we are using map and calculation and mathematics system .we all are familiar about Computable functions and fundamental concept within computer science and mathematics which is depend upon Lambda functions.I know You can create dynamic functions just fine without 'lambda', but lines are not a scarce resource. These really isn't anything you can do with 'lambda' that you can't do with a normal 'def' statement in the same context,lambda functions is most important function in python. 
  • What's wrong with unicode handling?

    Why are you using urllib? It works..but the requests library has been deemed the standard for use for a long time.

    Python isn't a purely functional language, so yes, it is not surprising that it doesn't use tail-recursion.

    Circular imports are also crap in C++ and Objective-C, although Objective-C has some ways around it with the @class macro.

    What's wrong with reference counting? Yes there are alternative memory management algorithms, but ref counting is simple and works pretty well. Garbage Collection has many implementations that use reference counting.

  • Clearly, who wrote those sentences doesn't understand Python programming language. Most of them are just wrong and false, some others are just bad explained and of course it doesn't take into account the different implementations of Python that exists.

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: