In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The pros and cons of the programming language Liuhe website to set up 2952777280 [source link] hxforum.com, there have been different opinions. If the creators of programming languages get together to talk about the languages they have designed, will there be another "bloodshed"?
In fact, just recently, Python founder Guido van Rossum, Java founder James Gosling, C# founder Anders Hejlsberg, Perl founder Larry Wall gathered in Seattle to discuss the design and future development of programming languages.
In early April, at the first annual charity event held by Puget Sound Programming Python (PuPPy), four legendary founders of programming languages gathered for a heated discussion about the past and future of programming language design. The campaign aims to raise money for computer science education for all (Computer Science For All, a new plan put forward by former US President Barack Obama earlier that year to popularize computer science in the US education system).
Panellists included the founders of the following popular programming languages:
The founder of Guido van Rossum:Python
Founder and Chief designer of the James Gosling:Java programming language
The original author of Anders Hejlsberg:Turbo Pascal, who also works on the development of C# and TypeScript
The founder of Larry Wall:Perl.
The seminar was chaired by Carol Willing, who is currently a member of the steering committee and developer of the Jupyter project. She is also a member of the first Python steering Committee, researcher and former director of the Python Software Foundation.
Key principles of programming language design
The first question raised by the panel was: "what is the principle of programming language design?"
Guido van Rossum believes that:
The design of the programming language is very similar to the way JK Rowling wrote her Harry Potter books.
He explained that JK Rowling was a genius and that some of the details she mentioned in her first Harry Potter book echoed the important plots in the sixth and seventh books.
Explaining the relationship between this and programming language design, he said: "the same is true in programming language design, we need to echo from beginning to end." When designing a programming language, we first promise some details, such as the keywords we want to use, the coding style we want to follow, and so on. But no matter what decision we make, we have to stick it out, and in the future, like JK Rowling, we need to find new ways to use these details.
He added: "on the one hand, in the work of designing a programming language, you have to make a series of choices at the beginning to lay the groundwork for the development of your story." on the other hand, the art of designing a programming language is that you need to constantly review your story and come up with ideas to advance it in ways you didn't expect. "
When talking about James Gosling's process of creating Java and the design principles he followed, he only said faintly: "the emergence of Java is not like a personal favorite project. In fact, we just want to try to build a prototype." At that time, James Gosling and his team carried out a project in the field of embedded systems. To this end, they talked to many developers who built software for embedded systems and learned about their workflow.
There are about a dozen people in the project, and Gosling is responsible for making the project as simple as possible from a programming language perspective. He added: "at first we just wanted to do something better than C, but then we lost control, and in the end the rest of the project just provided the material." Fortunately, Java survived the project. Basically, the programming language is designed to solve the problems of people living outside the data center, who are often troubled by network, security, and reliability issues.
Larry Wall feels more like a "linguist" than a computer scientist. He wants to create a programming language that is closer to natural language. He gives an example: "it's like we don't have to let everyone go to college to decide where they're going. We can observe where people want to go and then set shortcuts to those places." One of the basic principles behind the creation of Perl is to provide all the functionality through API. The goal of this programming language is not only to build an excellent text processing language, but also to become a glue language.
Wall further said that although Perl was very stable in the 1990s, there were some problems. So in 2000, the Perl team decided to break everything and came up with a whole new set of design principles. And, based on these principles, they redesigned Perl 6. Some of these principles make the right choice-using parentheses conservatively, otherwise including Unicode parentheses is not enough; there is no need to poorly reinvent object-oriented, and so on.
He added
"A lot of redesign is like saying, which pillar should we use to support everything? is the new design object-oriented? is it redesigned within the lexical scope, or on a larger scale? what is the correct pillar for each piece of information? if we don't have a pillar at all, how do we create it?"
Anders Hejlsberg says he follows the common principle of all programming languages he has come into contact with: "there is only one way to do something." He believes that if developers have four different approaches, they are likely to end up choosing the wrong path, and it will take a long time to realize the mistake in development. According to Hejlsberg, this is why developers always create something called "simple complexity", that is, after getting something complex, they mask the complexity through simple packaging.
Similar to Guido van Rossum's point of view, he added that when designing a programming language, you have to stick to it no matter what decision you make. When designing a programming language, you need to be careful about what you don't introduce into the programming language. Usually, people will give you their advice, but you can't really change the nature of the programming language. Although you can't really change the basic nature of the language, you can extend it. Basically you have two choices: either stick to the nature of the language or develop a new programming language.
Type system of programming language
When talking about how Python determines types, Guido van Rossum shares a story from the first launch of Python. At first, int is not a class, but actually a conversion function. Later, Guido realized that this was a mistake. "We had a lot of these features, and we realized that we had made a mistake, and we provided users with classes that were different from the built-in object types."
So the Python team decided to rebuild the entire type of Python and did a lot of cleanup. Therefore, they change the function int to the specifier of the class int. Now, calling this class means constructing an instance of the class.
James Gosling says he has always focused on performance, and one factor that improves performance is the type system. The type system is very useful in building optimization compilers and checking correctness in advance. Having a type system also helps to build a system for small devices. "in order to work in a limited space, you have to understand every possibility that the device offers, and the sooner you know it, the more likely you are to do a good job," he said. "
Anders Hejlsberg regards the type system as a tool. Developers like their IDE, and they are used to automatic completion of statements, refactoring, code navigation, and so on. These functions are realized through the semantic knowledge of the code, which is provided by the type system compiler. Hejlsberg believes that adding types can greatly improve developer productivity, although this is counterintuitive.
He added: "We thought dynamic languages were easier to master because you got rid of the shackles of types. However, it turns out that if you add types in a non-intrusive way and try to infer them well, you can be more efficient."
When it comes to type systems in Perl, Wall means that Perl 5 and Perl 6 have different types of systems. In Perl 5, all types are treated as strings, even numeric or floating-point types. The team wanted to retain this feature when redesigning Perl 6, but they realized: "it's fine if new users are confused about interchangeability, but if even computers are confused, that's not good."
So, in Perl 6, Wall and his team wanted to make it a better object-oriented and better functional programming language. In order to achieve this goal, they need a very reasonable type system and a very reasonable meta-object model at the bottom. In addition, you need to attach great importance to the slogan "everything is an object, everything is a closed loop".
What are the factors that affect the maintainability of programming languages?
Guido van Rossum believes that it is important to strike the right balance between flexibility and standardization if you want to enhance the maintainability of your programming language. Although dynamic typing is more useful for small programs, large programs need to adopt a rigorous approach. Moreover, it is best to implement the rules through the programming language itself, not leaving too much room for users to play freely. For this reason, Guido intends to add TypeScript-like technology to Python. He added:
"in fact, TypeScript is very useful, so we want to add a similar concept to Python. Of course, we will add it in a slightly different way because of our different locales."
In addition to the type system, refactoring engines have also proved to be very useful. With the refactoring engine, you can perform large-scale refactoring of millions of lines of code at a time. Usually, people don't rename methods because it's hard to read a piece of code carefully and then rename each variable correctly. If you have a refactoring engine, just click a few buttons, enter a new name, and refactoring can be done in 30 seconds.
Anders Hejlsberg says the TypeScript project comes from a large JavaScript code base. As these code bases become larger and larger, maintenance becomes extremely difficult. Later, basically these code bases became "write-only code". So we need to understand the semantics of the code, and this process reduces the difficulty of refactoring, he added. "this semantic understanding requires a type system, and when you start adding a type system, you can also add documentation of the code," he said. " Wall also supports the view that a good lexical scope helps refactoring.
The Future of programming language Design
When talking about the future of programming language design, James Gosling shares an underexplored area of programming-writing code that uses GPU. He stressed that at present, none of our programming languages can directly use GPU, and we should increase the development of this field.
Anders Hejlsberg says programming languages don't change as quickly as hardware or all other technologies. In terms of the speed of development, programming languages are more like math and the human brain. "We are still programming in the language invented 50 years ago, and all the functional programming principles are the results of research more than 50 years ago," he said. "
However, he also believes that today's programming languages tend to be multi-paradigm and will not strictly distinguish between categories such as object-oriented programming or functional programming.
"languages are moving towards multiple paradigms. I don't think we should say that I only like object-oriented programming, imperative programming, or functional programming languages."
Today, it is more important for us to understand the latest research, new ideas, and new paradigms and gracefully integrate these new ideas into our programming style.
Reader benefits: Java architect Advanced Learning Guide
If you are a Java programmer and are interested in the technical improvements mentioned in the appeal, you can add the QQ group: 867923845 clicks to get free reference resources for 1-5 years of Java engineers organized by the author. There are also a large number of interview questions and analysis. Welcome engineers to join us, make rational use of every minute of your time to learn to improve yourself, and stop using "no time" to hide your mental laziness! Work hard while you are young and give your future self an account!
There are more interview questions you don't know (including answers).
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.