+ 3

Does object oriented programming differ for all different programming languages

11th Jul 2017, 2:16 PM
Jay Chheda
Jay Chheda - avatar
3 Respuestas
+ 2
If you're asking if OOP is different than a non-OOP language, yes it's a different design. If you're asking if OOP language #1 is different than OOP language #2, then yes. It'll have similar design based around objects, but the language syntax could be much different.
11th Jul 2017, 2:20 PM
AgentSmith
+ 1
Yep, the implementation and syntax of OOP will vary from language to language like all other things, though there are a lot of similarities too. Looking at your tags, Python and Java are relatively similar in their implementation - both fully support Objects, use similar syntax for accessing methods and properties, and both largely subscribe to the 'everything is an object philosophy'. Even then in Java primitives like ints and floats are not objects whilst in Python they are. Looking at your tags again, C does not support OOP, HTML doesn't (for it's a markup language) although JavaScript uses objects to represent HTML elements. JS itself has both a relatively limited OOP implementation compared to Python or Java - it would appear more like a python dictionary that a class - yet it's object model (JSON) is one of the most adopted data formats ever lol. Basically OOP is a paradigm in programming, and all languages sit somewhere along the spectrum from not supporting it at all to "everything's an object" like Python. Syntax... assume syntax is different whenever you encounter a new Lang :)
11th Jul 2017, 2:52 PM
pominaus
0
Nope. They are same for every language. (I've worked on C#, Java, ES6 and Ruby projects) PS: Inheritance is implemented a bit weird way in ES5 (prototypal inheritance) which is a bit different than other languages. But the concept is same (almost).
11th Jul 2017, 2:47 PM
Salekin
Salekin - avatar