3 ms·
In your logic you equate statically typed and object oriented vs dynamically typed and functional. Object oriented programming is by origin (Smalltalk) dynamic
by ralfn 10y ago
In your logic you equate statically typed and object oriented vs dynamically typed and functional.
Object oriented programming is by origin (Smalltalk) dynamically typed. Class based programming languages (which we really shouldnt consider typical for oop) tend to borrow all their modern type features from functional programming languages. (Think polymorphism, generics, interfaces, etc.)
- spdionis 10y agoBy 'dynamically typed and functional' I think he meant javascript. Personally i wouldn't call javascript functional but...
- SamUK96 10y agoI dunno, i've talked to and seen the code of a few JS devs and they all code very function-based (i.e. little modularity, poorly refactor-able, flow is difficult to understand, <insert another consequence of functional programming>) Maybe that's just anecdotal though, since I know that JS supports some form of OOP.
- spdionis 10y agoAre you confusing functional programming with procedural programming?
- rubber_duck 10y ago>In your logic you equate statically typed and object oriented vs dynamically typed and functional. I think OP is talking about the narrower scope of Angular 2 + TS vs React + JS
- SamUK96 10y ago> In your logic you equate statically typed and object oriented vs dynamically typed and functional. Yes. JavaScript's structure is usually heavily functional and can often be non-modular. Typescript goes away from this somewhat with the construction of objects. > Object oriented programming is by origin (Smalltalk) dynamically typed. Really? Object orientation is all about forming your own types, so how could OOP have an origin in dynamic types?