What is a programming language?

Since you want to learn programming,Then we should at least know their own learning is what it okay?

Speaking of programming,In fact, the earliest still have to catch up with our big brother Alan Turing God go。At that time Turing invented Turing machine - this thing is very fast hardware,Finish all had easily shortened to two years of World War II where we do not start speaking up,We say that the main,The Turing Machine,Basically it is the first computer!

of course,Textbooks do not say that von Neumann computer is the father of it? Ok,I will not tell you they stir the base to the course ......,Well that is hooked up a few times。So,If you go to search for keyword "Turing von Neumann" Then you will see still a topic of debate "Who is the father of the computer"。

Turing machine that was the time in RBI,Limited operation times,simply put,Also known as finite machine,Specific method of calculation we do not speak omitted,But it's essential that we still have to mention,Function is。

Some of the functions non-stop operation,Storage etc.,This process ultimately help us calculate the desired results - OK,These are limitations on mathematics,And,Or binary。

Why use a binary?

Want the machine to do the calculation,Then it must use the simplest structure to achieve,Simplifying the issue:How can the workers on the assembly line to make computer? They do not need to know every member computer of how to use,Just put his hand tighten the screws on it。

The same computer,It does not care how you make a complex topic,It only needs to be concerned about the state of their own on the tape,Ie with and without。So,Alan found very clever,If the problem is transformed into a binary,The machine will be able to get!(After all that time, only the tape ah!)

Such,There is a state machine - Turing machine fathers。

In a flash, Allen went to God to do computer ......

Von Neumann genius wealthy people heard Eni Ake plan,I think "I rely on good no brains! But I like it!" And then went dry shares,Results succeeded,Later there will be a large-scale computer,But no way,RBI entry or paper tape - although it has been used to store the state of the transistor。

Over time,Ultimate computer retains the old structure - Binary。We still run this CPU this old algorithm,The only difference is that the transistor becomes a nanoscale semiconductor。

This time computer speed greatly accelerated,You can run "on my knees in an arrow" such a big game,Do developers but also silly to poke with a stick tape it? Of course not,A long time ago,My brother could not understand the situation there,He invented a machine language。

compilation? Ok,almost。

we all know,Assembler is a machine language,It is straightforward to use simple words represent the machine code - yes,Different companies are different assembly language。

As a program ape,You do not know how the nerve to compile a seventy-eight out to see people? Wheel of history rolls forward ah,C language to come out。It is the success of the program into a language humans can understand a word!

You just need a bit of code written in a specific format,Into the compiler inside brush brush,The program is ready to run!

This time you know,"Compile",It is a necessary process into a modern programming language program,Your iPhone can not know what Swift。

But the C language still has its limitations,This thing is still too low level,It is not enough ah。If you know C language,So I ask:“How to write "mountain pass" ( "World of Warcraft") with C language?"Actually, this is a bit boring,This is my teacher tell me what is object-oriented process-oriented when asked what is to。

Functional programming language C is certainly good,But clearly streamline every process that such a development was doomed in a big team which it was unable to perfect coordination。With so Microsoft C ++ ,That is, we often say that the CPP;With Apple's Objective-C;Ok,We have a Java。Later, because there is a plus sign behind the C,Does not fit,Extra plus pile up,With the right again C #。

Here are less rigorous description,I hope you do not go into too,Just talk。I want to say is focus“Object- Oriented” Programming That is OOP,That is, we often say "object-oriented" programming born。

Object-oriented benefits are mutual between the various classes no longer restricted! Each class every method to do their own thing,You just need to call when in use (call) they are!

Here we have talked about Java,Before we talked about this thing compiler,Different Java compiler and C language。Because object-oriented languages ​​are high-level language,It got rid of the shackles of the C language for the process,So people want,That is not the way to make it compile a full platform to run it?

This is also mentioned in front of us:Different platforms,Assembly language is probably not the same - different architecture,It is not the same binary instructions。This determined,你 VB 只能在 Windows 下跑C 语言想要跨平台必须带着源码重新编译——事实上要处理的问题可不是说说这么简单

于是就诞生了 “Java 运行时”——这也是 Java 的理念叫做“一次编译全平台运行”从此你再也不用关心内存是什么了!Java 环境帮你搞定一切,You just need to concentrate on your program code can be!

I have to say,This is the reason most people Tucao later Java memory management。

Talk so much Java,Swift is our course? of course,I want to say is,Automatic memory management,Has become a high-level language standard (so no high-level language pointer)。Thanks to these advanced features,Your code will no longer be translated into binary,But something called "bytecode" things,This kind of thing can be certain execution environment - for example, iOS。

But I want to say,Swift and OC compiled bytecode is the same,This is also one of the reasons a lot of people Tucao Swift is not much better than the OC。

Having said that,I think you should basically understand what a programming language - in fact, this thing is to be converted into human thinking logic of a computer program tool,Like people need the same language as dialogue,You want to tell the machine what to do,We need a programming language to let the computer know what you mean - Computer stupid,So you can not say so artistic. "give me a glass of water"This command is not able to perform,(We assume that there is such a robot come out),Then you should do in terms of:


(Code only for entertainment)

Original article written by Gerber drop-off:R0uter's Blog » What is a programming language?

Reproduced Please keep the source and description link:

By R0uter's Blog

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a Reply

Your email address will not be published. Required fields are marked *