My Manager asked me to code in ASP.net. What is meant my imperative and interrogative code. How it related to programmers?
-
I really think you should ask your manager what in the world he meant. Because his request just doesn't seem right, there must have been a misunderstanding along the way. – Robert Gould Jan 08 '09 at 08:07
3 Answers
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.

- 4,117
- 2
- 26
- 18
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).

- 68,773
- 61
- 187
- 272
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.

- 35,511
- 22
- 84
- 118