Multi-language mode simultaneously:. NET Language and pattern survey

Source: Internet
Author: User

This article discusses:

Object-Oriented Programming

Functional programming

Dynamic programming

New patterns for. NET languages

This article uses the following techniques:

C #, C + +, F #, IronPython, IronRuby, Visual Basic

The Windows operating system is the perfect platform for programmers. There are hundreds of languages for Windows®, some of which are implemented directly through the WIN32®API or the CLR, but more often through your authoring.

One of the goals of the CLR is to make the flowers blossom in a compatible ecosystem, seamlessly integrating language and APIs into the same runtime. So far it has been a great success--new languages abound. Microsoft implementations such as Ruby (IronRuby), Python (IronPython), and PHP (Phalanger) are dynamic language categories that are now first-class members of the Microsoft®.net Framework language. A functional language called F # has recently been introduced. Although you may have heard a discussion about these new languages and language patterns, you might want to know what they mean.

The introduction of these language patterns and the content of some of these important implementations not only answer your questions, but also help explain how some of these new languages and old patterns will affect the design and implementation of the future versions of C # and Visual basic® languages.

To understand the changes that the new design shows, you need to understand the differences between traditional languages, such as C # and Visual Basic, and new languages, such as F #, IronPython, and IronRuby. This aspect involves three main themes: Object-oriented programming (models that both C # and Visual Basic use), functional programming (F #), and dynamic programming (IronPython and IronRuby). Let's take a look at these patterns and explore their distinguishing features.

Object-oriented

Object-oriented (OO) is one of the most familiar patterns you might have. It allows you to describe the environment that an object poses with the conventions that bind them to each other. OO uses a variety of features such as type conventions, polymorphism, and subtle visibility to provide excellent reuse and encapsulation features.

In general, Object-oriented languages take on static type systems, so they are called static type languages. This means that all types created and used by the program are checked at compile time, which prevents you from invoking method Moo on objects of type Duck (in the absence of this method). Before the code runs, the compiler detects conventions that are corrupted and misused between various types, which in theory reduces run-time errors.

But there are some flaws in OO. Type security may cause programmers to rely too much on compilers to catch errors, rather than creating the necessary test infrastructure in person. At the same time, OO also prompts programmers to define their own conventions, which often runs counter to rapid prototyping and multiuser programming environments. In large software projects, the conventions between components (usually owned by different teams) tend to evolve throughout the development lifecycle, which requires that the agreed consumers keep updating their code. Because of these problems, OO language may seem a bit complicated and verbose.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.