Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the 27 programming languages that improve Python

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

What are the 27 programming languages to improve Python? this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

27 languages

Procedural programming languages: C, Rust, Cython

Object-oriented data modeling languages: Java, client, Eiffel

The object-oriented derivative language of C #: Clippers, D

Array-oriented data processing: MATLAB/Octave, Julia

Statistical data analysis: r

Computational pipeline modeling: Haskell, Scala, Clojure, F#

Event-driven programming: JavaScript, Go, Erlang, Elixir

Gradient type: TypeScript

Dynamic metaprogramming: Hy, Ruby

Practical problem solving: Lua, PHP, Perl

Computational thinking: Scratch, Logo

As a co-designer of one of the world's programming languages, I often come across a very frustrating behavior (in the Python community and other areas) where influential people in the community try to instill a fear of "missing" in other open source communities and drive others to contribute to this community (and I occasionally do this inappropriate behavior myself). It is also easier for me to detect when others fall into this trap.

While it is a good thing to learn from the experience of other programming language communities, it is a big problem to use fear-based methods to promote action. In order to attract the attention of code contributors, community members tend to regard members of other communities as competitors, rather than as potential allies to meet challenges and promote the progress of software development technology. It can also cause the community to reject those who like other programming languages as enemies.

In fact, we want to have a richer choice of cross-platform open source programming languages, which are the most important thinking tools that can translate our ideas into clear terms that computers can understand. If people find that a certain language is suitable for their brains and can solve problems directly, that's good. Don't worry about which language they choose.

So I would like to make three specific requirements and a broader proposal for the Python community, starting with these requirements:

1. When we want to inspire tribal members and improve the attractiveness of the community, we should not use the fear method, but should use the pride method. When using fear incentives, such as: "if we don't solve problem X, then Python developers will decrease and they will turn to the language Y", then we are deliberately transferring negative energy to people around the world who are free to contribute code. But if we use the pride method, the words will go something like this: "problem X in Python is really difficult to solve. Look at the community of language Y who have solved this problem in an excellent way. We can also try this solution in Python to solve problems in Python in the same elegant way." A positive emphasis on "being proud of our own efforts" will help to promote a culture of continuous learning in the Python community and will continue to promote the development of relationships with other communities.

two。 Refrain from contempt for other programming language communities, especially those where there are bulls who can solve problems on their own and don't have to wait for commercial software vendors to condescend to solve problems. Most of the important problems in the world are not interest-driven (those people want to solve problems, not to seek wealth, and there are no institutions to support them), so we should encourage and praise those who step up their efforts to solve the problem. It doesn't matter what technology they use.

3. If people we know are just starting to learn programming, even if they choose a programming language that we don't like. We have to support them, too, because they know better than us what suits their brains. So the language that is right for us may not be suitable for them. It makes more sense to recommend programming languages if they start to feel frustrated with their choices and completely discourage them from learning programming. This suggestion is even useful to those of us who have done work to improve network security. for originally unsafe languages, our solution is to gradually break down this language selection barrier by improving the function of sandboxie in the operating system. the default behavior of programming language is improved by using the security attributes of the native system, and the quality of programming language should not be evaluated from the perspective of application security to confuse beginners. If someone asks a novice programmer to write an unaudited software but deploy it to deal with security-sensitive issues, it is not the programmer's problem, but the deployer's failure to due diligence the source and security attributes of the software. )

My more advice is that people start to encounter the core assemblies of Python, and therefore begin to explore more of Python's own "thinking tools."

Part of what we do in the core development process of Python is to understand whether we have the advantage over other languages to make Python code easy to read and write in an appropriate way. This means that learning other programming languages can define specific styles, and programming in Python can improve people's understanding of software development.

To help with this effort, I have listed the following areas to explore, as well as some languages that may provide additional insights into these areas. I try to link to the Wikipedia page instead of going directly to the relevant home page, because Wikipedia often gives some interesting historical background, which is worth exploring when choosing a new programming language as an academic exercise rather than being used immediately for practical use.

Personally, however, I am familiar with many programming languages (and have used some of them to develop production systems). All the recommendations include languages I know indirectly (or by reading materials and design documents, or by learning about the strengths and weaknesses of a language from communication with friends I trust).

There are supposed to be a lot of edges on the list, but these specific languages are just random subsets, which are selected to some extent based on my own interests (for example: my main interest is the dominant Linux,Android and Windows ecosystems So I ignore the closed but more profitable Apple-centric Objective-C and Swift programming languages here, and I don't know much about programming languages that focus on artistic environments, such as Processing, and I even need to guess how what I've learned from it can guide a Python developer. There are many factors to consider for a more comprehensive list of programming languages, in addition to considering that a programming language can guide you to become a developer, IEEE Spectrum's annual ranking of programming language popularity and growth is also worth checking out.

Process-oriented programming language C _

The default running model of Python is procedural: we start at the top of the main module and then execute sentence by sentence. All Phthon's method support for other data and computational models is based on the fact that it is procedural.

There is no doubt that C is still the ruler of the underlying programming language. It is not only the core language to implement the Python interpreter, but also the core language to implement the kernel of Linux operating system. As a software developer, learning the C language is the starting point for learning more about the underlying hardware on which the software runs. C language is often described as a "portable assembly language", and C language compilers are usually used as cross-compilers to compile * applications for the new CPU architecture.

Rust, by contrast, is a relatively new language created by Mozilla. The reason it is on this list is that Rust learns lessons from industry about what can't be done in C, and is designed to interoperate with C libraries. It controls hardware with the same precision as low-level system programming languages, but uses different compile-time methods for data modeling and memory management. Structurally, it eliminates many common defects that plague C programs (such as cache overflow, repeated memory release errors, null pointer access and thread synchronization problems). I am an embedded systems engineer with initial professional experience through training, and I have seen that areas currently dominated by the C language and custom assembly code are likely to be replaced by Rust.

Cython is also a default lower-level language, but unlike the general target language Cpene Rust, Cython is mainly used to write CPython extension modules. Cython is designed as a superset of Python, allowing programmers to choose when to support the flexibility of pure Python syntax, when Cython syntax supports extensions that make the code it can generate equal to the speed and memory efficiency of native C code.

Learning one of these languages is to enhance its deep understanding of memory management, algorithm efficiency, binary interface compatibility, software portability, and converting source code into running systems from a practical point of view.

Object-oriented data modeling: Java, caching, Eiffel

One of the most important tasks in programming is to model the state of the real world. The most common method in this aspect is the native syntax support provided by object-oriented languages: combining data structures and methods that manipulate these data structures into classes.

Python can use object-oriented features directly in its native design without having to learn how to write its own classes first. Not every language has this approach-for the languages listed in this section, learning object-oriented design ideas is a prerequisite for using them.

Thanks to the marketing promotion of Java by Sun Microsystems in the middle and late 1990s, Java has become the default language for introductory courses in computer science in many colleges and universities. Although it is now being eliminated by Python in many areas of education, it is still a language in business application development. There are a range of other languages for the common JVM (Java virtual machine) runtime implementation, including the Jython implementation of Python. The Dalvik and ART environment of Android system is based on Java programming API.

C # is similar to Java in many ways and emerged as an alternative language to junk + after Sun and Microsoft failed to resolve inconsistencies between junk + (the Java language implemented by Microsoft) and standard JAVA. Like Java, it is a popular business application development language with a range of other languages for shared .NET CLR (common language runtime) implementations, including Python's IronPython implementation (the core components of the original IronPython 1.0 were extracted to create the middle tier of the .NET dynamic language runtime). For a long time, .NET was a proprietary technology that could only be used in Windows systems. A cross-platform open source code mono reimplemented .NET, but in early 2015, Microsoft announced its open source plan for .NET.

Unlike most languages on the list, I don't recommend using Eiffel on a daily basis. It is on the recommended list because the language has a large number of excellent object-oriented design ideas, including "authentic" as the design goal of the program. (at the same time, Eiffel also told me that for most software development, there is no "correct and reliable" design goal, this is because correct and reliable software really can not properly deal with uncertain situations. When many of the relevant constraints are not clear and need to be gradually improved in the process of iteration, this design concept is completely inappropriate)

To learn such programming languages, you need to be familiar with inheritance models, contract design, class invariants, preconditions, postconditions, covariance, contravariance, method lookup paths, generic programming, and various other features that are also supported on Python's type system. There are also many standard library modules and third-party frameworks that use "display object-oriented" design styles, such as unittest and loggingmodules, as well as class-based view in the Django framework.

Object-oriented Corex Centrals, D

One way to use CPython is to think of its kernel as a programming environment of "C language containing objects"-CPython implements object-oriented programming in the style of C, that is, to describe the data in the structure of C, and then pass the instance pointer of the structure as * * parameters to those data processing functions (that is, the omnipresentPyObject* pointer in C of CPython). This design pattern is intentionally copied into Python, specifying self or cls parameters that need to be displayed in instance methods and class methods.

C++ 's goal is to be fully compatible with C at the source level, adding some advanced features, such as native object-oriented programming support and template-based metaprogram development. C++ is notoriously obscure and complex (even though the 2011 update to language standards addressed many of the worst problems), C++ is still the choice for many scenarios, including a 3D modeling graphics engine and cross-platform application development frameworks such as Qt.

The D programming language is also interesting because its relationship to C++ is much like that between Rust and C: it is designed to retain most of the advantages of C++ while avoiding many of the shortcomings of C++ (such as lack of storage security). Unlike Rust, D is not a completely new programming language designed from scratch. Instead, it is a language derived directly from C++. Although it is not a strict superset of C like C++, it adheres to the design principle that any code that falls into the common subset of C and D must behave the same in both languages.

Learning these languages contributes to a deep understanding of the complexity of combining high-level language features with the underlying C runtime model. Learning C++ can also help you work with existing libraries and toolkits written in C++ using Python.

Array-oriented data processing: MATLAB/Octave, Julia

Array-oriented programming is used in numerical programming models: based on matrix algebra and related numerical methods.

Although Python's standard library is not directly supported, language design has been taken into account, and a series of syntactic and semantic functional support contributes to the third-party library NumPy and similar array-oriented tools.

In many cases, Python scientific computing software series is used as a substitute for dedicated MATLAB programming environment, and is widely used in scientific and engineering modeling, simulation and numerical analysis. The goal of the open source project GNU Octave is to be syntactically compatible with MATLAB code, allowing people to compare the two ways of object-oriented programming.

Julia is another relatively new language. Its main feature is that it supports array-oriented programming and type-based function overloading.

Learning such a language contributes to an in-depth understanding of the power of the Python scientific computing toolkit. At the same time, learning such a language helps to study how to use similar technologies such as OpenCL and Nvidia's CUDA to achieve hardware-level concurrent execution, and how to use data processing frameworks such as Apache Spark and Blaze to implement distributed data processing.

Statistical data analysis language: r

As there are more and more big data collections to deal with. Therefore, there is a need for a free analysis tool that can handle such data sets, and the programming language R is one such tool, which pays special attention to statistical data analysis and visualization.

Learning R language is helpful to deeply understand the statistical functions of Python scientific computing toolkit, especially the data analysis library pandas and statistical visualization library seaborn.

Computational pipeline modeling language: Haskell, Scala, Clojure, F#

Object-oriented data modeling and array-oriented data modeling are mainly used for static modeling of data. there are two modeling methods, one is to save the data in various attributes of the object, and the other is to save the structured data as an array.

In contrast, functional programming languages put more emphasis on dynamic modeling of data in the form of computational flow. As long as you learn the basics of functional programming, you will significantly improve the ability to model data using data transformation operations. this is also helpful for developing applications using programming languages that use other paradigms, such as process-oriented, object-oriented, and array-oriented programming languages.

Haskell is a functional programming language that has had a significant impact on the design of Python, the most obvious being the list parsing introduced by Python 2.0.

There is no doubt that Scala is a functional programming language based on JVM. Like Java, Python and R, it is one of the four main programming languages of Apache Spark data analysis platform. While supporting functional programming in design, Scala's syntax, data model and execution model try to avoid too many obstacles for original Java programmers. (from this point of view, the more appropriate classification of Scala should be an object-oriented programming language with strong functional language support).

Clojure is another functional programming language based on JVM and is seen as a variant of Lisp. It has a place on our list because it inspires the implementation of Python's functional programming toolkit, toolz.

I am not familiar with F# myself, but it is worth paying attention to because it is the language recommended by the .NET CLR.

Learning these programming languages will help you understand Python's own computational pipeline modeling tools, including container derivation expressions, generators, generator expressions, functools and itertools standard library modules, and third-party functional Python tools such as toolz.

Event-driven programming languages: JavaScript, Go, Erlang, Elixir

Computing pipes are a good way to deal with data conversion and analysis problems, but many problems require programs to run in a persistent manner, wait for events to occur, and then deal with them. For such services, multiple events can usually be handled concurrently to provide services to multiple users (or at least multiple behaviors) at the same time.

JavaScript was originally developed as an event handling programming language for browsers that allows web developers to handle client-side local user behaviors (such as mouse movements and keystrokes) and events (such as the end of page rendering). All modern browsers support JavaScript, and together with HTML5's DOM, it has become the de facto standard for the appearance and behavior of the user interface.

Go is designed by Google. The language is designed to create highly scalable network services. Go is very suitable for developing command-line programs. From the perspective of designing programming languages, the most striking thing is that the Go language uses the concept of "sequential communication process (Communicating Sequential Processes)" in its core concurrency model.

Erlang is designed by Ericsson, the language is designed to create highly reliable telephone exchanges and similar devices, the famous open source framework RabbitMQ message server is implemented in Erlang. Erlang uses the Actor model to implement the core concurrency primitive, which does not allow different threads to share data directly, and the communication between threads can only rely on passing messages. Although I have never used the Erlang language myself, my * * work involves developing a concurrency framework based on the Actor model, which was developed by a former Ericsson engineer with C++. I have also developed such a framework based on TSK (tasks) and MBX (mailbox) primitives, which is implemented in Texas Instruments' lightweight DSP/BIOS runtime (now called TI-TROS).

The reason Elixir is on this list is that although it runs in the Erlang virtual machine and has the same concurrency semantics as the programming language Erlang, it also contains a series of additional language-level features that provide a more comprehensive development environment that makes it easier to attract developers who switch from other programming languages such as Python, Java, or Ruby.

Learning such a language contributes to a deeper understanding of how Python itself supports concurrency and parallelism, including native protocols, generator-based protocols, concurrent.futures and asyncio standard library modules, third-party network service development frameworks such as Twisted and Tornado, the newly introduced channels concept in Django, and the event handling cycle in the GUI framework.

Dynamic and static mixing type: TypeScript

One of the most controversial features introduced by Python 3.5 is the new type module, which adds mixed type support to the Python system.

For developers who have come into contact with statically typed programming languages, mainly C, C++ and Java, this is a terrible idea.

Microsoft's TypeScript provides mixed-type support for JavaScript applications, giving you a better view of the concept. TypeScript code is compiled into JavaScript code (compiled without any run-time type checking), and TypeScript comments (annotations) for mainstream JavaScript libraries can be found in the DefinitelyTyped code base.

As Chris Neugebauer pointed out at the PyCon conference in Australia, this is much like the relationship between Python and the type prompt library typeshed and type derivation and analysis tools like mypy.

In essence, type hints for both TypeScript and Python are ways to implement a specific test program, whether it's a separate file (a regular test program) or embedded in the main code (similar to a type declaration in a static programming language). In either case, you can run a separate command to check that the remaining code conforms to known type constraints (for JavaScript and TypeScript, it is implicitly done at compile time, and for Python type hints, it is an optional static analysis task).

Dynamic metaprogramming: Hy,Ruby

One of the somewhat disturbing features that programming languages like C, C++, C #, and Java bring to Python is "code as data": similar functions and classes are run-time objects that can be manipulated by other objects.

Hy is a variant of Lisp that runs on both CPython virtual machines and PyPy virtual machines. Lisp does this on "code as data", and the Lisp code itself is made up of nested lists that describe the operations that need to be implemented (the name of the language comes from "LISt Processor"). The big thing about Lisp-style languages is that they can easily implement their own domain-specific language (DSL), but this sometimes makes it difficult to read other people's code.

Ruby is similar to Python in many ways, but as a more open community, Ruby is more receptive to dynamic metaprogramming, which is only "supported but discouraged" for Python. This includes redefining classes by adding methods and using closures to implement language core structures such as iterators.

Learning these languages can help you gain an in-depth understanding of Python's own support for dynamic metaprogramming, including functions and class decorations, monkeypatching (dynamically modifying code), unittest.mock standard library modules, and third-party object proxy modules such as wrapt (I haven't found any programming languages that can help you understand Python meta-classes (metaclass), if anyone has any good suggestions, please let me know in the comments. Advanced features of metaclasses include run-time execution of core types, abstract base classes, enumerated types, and mixed types (mixed dynamic and static class types) expressions.

Pragmatism: Lua, PHP, Perl

Popular programming languages are usually not isolated-they are part of a vast ecosystem (both business and community), as well as end users, framework developers, tool developers, educators, and so on.

Lua is a popular programming language, mainly embedded in large programs as a script engine. Examples worth mentioning are plug-ins written for Warcraft's game client, and Ruby is also built into the RPM tool that exists in many Linux distributions. Compared to CPython, the Lua runtime is only 1/10 in size, and its ability to weaker introspection makes it easier to be independent of the rest of the application and the host operating system. One worth mentioning contribution from the Lua community to the Python ecosystem is that CPython and PyPy adopted LuaJit FFI (Foreign Function Interface) as the basis for their JIT-friendly cffi interface library.

PHP is another popular programming language, and PHP is widely known as part of LAMP stack (Linux-Apache-MySQL-PHP) because it is good at generating HTML pages and is widely used by early virtual server hosting providers. Despite many distressing conceptual flaws in its design, PHP has become the basis for many well-known open source web services, including the Drupal content management system, the WordPress blog engine, and the MediaWiki engine that supports Wikipedia. PHP can also support many important services, such as Ushahidi, a distributed event reporting platform used by the crowdsourcing community.

Like PHP, Perl is also a popular language on Linux systems. Unlike PHP, Perl is not well known as a website development platform, but is more commonly used as a tool for system administrators to manage the system. It can use regular expressions to process strings as well as the output of text-based Linux operating system commands. You can handle all tasks with only Perl, eliminating the need for tools such as Whensh, awk, and sed.

Learning one of these languages does not provide any good insights into programming language design that is aesthetically beautiful or conceptually simple. The possible result is to provide some knowledge of the structure and adoption of the programming language in practice, as well as the role of learning about chance, the accumulation of history, and lowering the threshold for entry (making default possible through redistribution). These are stronger than the inherent capabilities of the language itself.

In particular, it can provide insights into the project significance of CKAN, OpenStack NFV, Blender, SciPy, OpenMDAO, PyGMO, PyCUDA, Raspberry Pi Foundation and Python, ensuring the sustainability of institutional investment in the Python ecosystem through a wide range of business organizations.

The idea of numerical calculation: Scratch,Logo

What I want to say is that I often get caught up in the debate between structured programming and object-oriented advocates. The latter claims that object-oriented programming languages are as easy to learn as structured programming languages.

When we are talking about teaching (robotics) through specific numerical experiments, the model of the research object in the simulation software has a direct real-world reference, such as students have access to sensors, engines, relays and so on. I think there is some truth in supporting object-oriented friends.

For others, however, a typical challenge is to pick up a cookbook, convert one of the recipes into an object-oriented programming language that you think is easy to learn, and then find a student who understands the programming language. to continue to convert this recipe. (I look forward to seeing academic researchers actually practice this learning process-- I will be sincerely gratified by this situation. In most cases, friends do not have to follow the process of simply experimenting with thinking in their heads to make them feel how much preparatory knowledge is needed to learn this "easy" programming language.

Another way to solve this problem, however, is to learn the programming languages used to educate children about numerical computing.

One of them is Scrach, which is a programming interface that allows students to operate a closed graphical environment by dragging so that they can see the corresponding movements and reactions in the graphical interface. A graphical environment like Scrach is a way of programming similar to using comic books to help children gradually learn to read and read.

However, the idea of using a programming language for special educational purposes to operate a graphical interface is not new, and with the creation of Logo, one of the most classic early environments, in the 1960s (similar to Python's own Turtle module), the main thing you came into contact with was a "sea turtle", and you could change the graphics environment by ordering it to move. In this way, things like the command line, iterations, states (for example, up and down) are all based on people's natural and intuitive way of thinking (imagine, if you were a sea turtle, what would happen if you rotated 90 degrees to the right? ) based on the introduction.

Going back to origin, as an experienced programmer, relearning any of the above programming languages is the most effective way to forget what you have learned (abandoning some wheels): the concepts covered by these language tools help us recall concepts that we once took for granted. but you need to relearn it from the perspective of a beginner. When we do this, because we are more willing to recall the whole logical chain, including the thought steps that we took for granted and omitted, we work more effectively with students and other beginners.

This is the answer to the question about improving Python in 27 programming languages. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report