views:

272

answers:

3

My Manager asked me to code in ASP.net. What is meant my imperative and interrogative code. How it related to programmers?

+1  A: 

Although I'm not sure its a "popular" way of programming, interrogative-programming is basically summed up by this:

Domain specific programming languages tend to be rigid in capability and dependent on either a graphical interface or a scripting language. We present a question-oriented approach that requires no prior knowledge of programming and can be easily adapted to a wide range ofdomains. Interrogative programming works by "parsing" the user's intent using the responses to a series of closed-ended questions. Questions are guided by a context free grammar specified in an external file. -Quote

While imperative programming is the way most procedural code is written (C style).

Robert Gould
A: 

Imperative in English means in a 'commanding tone'. So a program that seems to be telling the computer to "do this, do that" is an imperative program. A C program is a good example of that.

As opposed to this there are other languages that are called declarative such as Haskell, that read like mathematical theorems without seeming to demand anything from the computer.

Frederick
+2  A: 

Imperative code does not return a value. It just does something. (A sub in vb.net or a void return type in c#).

Interrogative code does return a value.

Stever B