Đá Hoa Cương Hoài Hận

tư vấn bán hàng



I was looking the web based seeking a definition for ming who would destroyed certain light for my situation

I was looking the web based seeking a definition for ming who would destroyed certain light for my situation

Yet not, the language utilized on some of the tips that we keeps discover try overwhelming – as an example within Wikipedia. Do anyone enjoys a real-world example that they you’ll show-me that may bring certain direction to this subject (perhaps from inside the C#)?

19 Responses 19

  1. Would a consequence collection
  2. Action as a result of for every count on collection
  3. Look at the amount, in case it is odd, add it to the outcome

What is the difference between ming?

Having ming, on the other hand, your develop password one relates to what you would like, but not always the way to get they (state their need overall performance, but not the step-by-step):

Right here, we are saying “Give us that which you where it’s weird”, perhaps not “Action through the range. Take a look goods, in case it is weird, add it to an effect range.”

ming happens when you say what you would like, and you can essential vocabulary is when you state the way to get what you prefer.

To tie in a c# example, essentially, having fun with LINQ leads to a great declarative layout, as you aren’t claiming tips receive what you want; you are only claiming what you would like. You could say an identical in the SQL.

One of the benefits away from ming would be the fact permits brand new compiler so you can make conclusion that may end in most useful password than what you can make manually. Running to the SQL analogy, if you had a query such as

the new SQL “compiler” can “optimize” so it ask because it understands that id was a noted https://datingranking.net/sugar-daddies-usa/ca/ profession — or possibly its not listed, in which particular case it’ll have so you’re able to iterate over the whole research put anyway. Or the brand new SQL motor understands that this is the primary time and energy to utilize all the 8 cores to have a fast parallel look. You, since the a programmer, are not concerned with those conditions, therefore won’t need to develop your own password to handle any unique situation that way.

A development paradigm is actually an elementary types of computer programming. Discover five fundamental paradigms: vital, declarative, functional (that’s thought an effective subset of your declarative paradigm) and you will target-built.

ming paradigm one expresses this new reasoning of a calculation(Exactly what do) as opposed to explaining their manage disperse(How do). Certain better-identified samples of declarative domain name particular languages (DSLs) include CSS, normal words, and you can a great subset out-of SQL (Discover concerns, for example) Many L, XSLT. are ming just be sure to blur the fresh new difference in an application just like the a collection of tips and you will a program since the a denial concerning the wanted answer.

Crucial programming : try a programs paradigm one makes reference to formula with respect to statements one to transform a course condition. The fresh new essential software is dually seen as coding orders or statistical assertions.

Functional coding : was a development paradigm one to food calculation because the investigations regarding statistical features and prevents condition and you will mutable analysis. They stresses the use of features, compared to the new imperative coding concept, hence emphasizes alterations in state. In the a pure functional language, eg Haskell, all the characteristics was as opposed to side effects, and you may state changes are merely portrayed due to the fact characteristics you to definitely alter the fresh condition.

The following illustration of imperative coding when you look at the MSDN, loops through the amounts step one using ten, and you can finds the fresh also quantity.

Each other instances yield the same results, and another are neither greatest neither even worse compared to almost every other. The initial analogy demands so much more password, although code are testable, additionally the imperative means offers complete power over this new execution facts. Regarding 2nd analogy, the brand new password was arguably alot more viewable; not, LINQ will not make you command over what goes on about the brand new views. You must trust one LINQ will give the fresh questioned results.

bài viết liên quan

0932 36 36 30