0

In some languages you can do a lot very easily. For example: if I want to get a value of a XML document, I can easily write this line of code:

result = XML.GetValue("root/element/element");

What type of programming paradigm you can infer from this line of code?? (Object-oriented?, procedural?, ...)

And please introduce some other languages that use that programming paradigm.

wiki
  • 1,877
  • 2
  • 31
  • 47

2 Answers2

1

Well, that looks like XPath which is a query language (more infortion http://en.wikipedia.org/wiki/XPath )

More query languages are listed here - http://en.wikipedia.org/wiki/Query_language

PolarisUser
  • 719
  • 2
  • 7
  • 18
  • Diego would be right, if it is asking about the entire line of code, which is c#, which is OOP (like Java) but I think the question is about the XML part? – PolarisUser Jul 18 '12 at 18:47
0

Such a line of code may be considered an object-oriented programming paradigm since a stateful function call is involved. The example is really poor actually but may give that idea. Because the GetValue "procedure" is acting on an object with a previous state knowing the specific xml document.

Talking about programming language using that paradigm they are the most popular nowadays: Java and C# for example

Diego D
  • 6,156
  • 2
  • 17
  • 30