Class (computer programming): Difference between revisions

Content deleted Content added
Object-based programming: move "Object-based languages with this property do not provide the structural benefits of statically type checked interfaces for objects." to the talkpage; is it true?
Line 66:
==Object-based programming==
Some languages have objects, but no classes; in such "[[object-based programming|object-based languages]]", objects are not restricted to class structure.
 
Object-based languages with this property do not provide the structural benefits of statically type checked interfaces for objects. This is because in object-based languages it is possible to use and extend data structures and attach methods to them at run-time. This precludes the compiler or interpreter from being able to check the type information specified in the source code as the type is built dynamically and not defined statically. Most of these languages allow for ''instance behaviour'' and complex ''operational polymorphism'' (see [[dynamic dispatch]] and [[Polymorphism (computer science)|polymorphism]].
 
Examples of such languages are [[Visual Basic]] and [[JavaScript]].
 
==C++==