+ 6
Do all programming languages (High level) have OOP ?
12 Réponses
+ 6
Oops purpose is code reusability, hence reducing maintenance efforts.
The criterias for pure OOP languages are
1. Encapsulation/data hiding
2. inheritance
3. polymorphism
4. abstraction
5. all predefined types are objects
6. all user defined types are objects
7. all operations performed on object must be only through methods exposed at the objects.
Based on above criterias, we have
# Purely OOP - python, ruby, smalltalk
# Partially OOP -
C++(oop not intrinsic, class can be optional),
Java (has primitive types),
Javascript ( is actually an imitation of OOP with prototypes)
# Non OOP(no direct support for oop) - Assembler, C, (although few features can be implemented undirectly ), FORTRAN, PASCAL
please reply if any corrections
+ 9
However, just because the language doesn't have OOP support doesn't mean you can't program OOP code. I was coding OOP long before any language I knew provided support for it as it limited bugs.
+ 7
I've done OOP in Assembly mainly because that was how I coded everything by then. Data hiding is important there just like everywhere else. I've never coded massive Assembly programs only a few thousand lines. Mostly, I'd hand optimize time critical functions because compilers didn't do a decent enough job.
+ 4
thank you krOW ,
as I expected.
+ 4
As John Wells said, you can practically do OOP in Assembly too
+ 3
thanks for your info
+ 3
KrOW 😜 hehe. Nice to talk to you though.
+ 2
No
+ 2
👍👍👍
+ 2
KrOW, I don't know enough assembly, otherwise I'd have sent you the code already.
+ 1
Yes, if do you like shoot on feet 😁
- 1
Rugved Modak My was a joke (but with a few of true) then i dont contest this but if i have to say my think, if you use oop in assembly its because do you want:
- Experiment
- Make you bad
Exists an very wonderful way to mix low-level, high-level and oop and its called "C++"