Wednesday, October 24, 2007
Comparing Programming Languages
Comparing programming languages has always been interesting. A thorough understanding of Object Orientation, Static/Dynamic/Duck typing, Functional Programming, Generics, Aspects, Closures, Design Patterns, Data Structures and Meta Programming will let a programmer hop from one language to another very easily. For example, though both Java and JavaScript are Object Oriented, Java is Class-Based whereas JavaScript is Prototype-Based. Java forces programmers to implement proper namespaces, where as JavaScript does not. Most JavaScript programmers define variables in global scope, though it is possible to organize them with namespaces. Haskell is fundamentally different from other programming languages since it uses functions as basic building blocks. Python, Perl, Ruby and PHP support Dynamic Typing, where as C, C++ and Java support Static Typing. DuckTyping is implemented in the core of Python, but not in languages like Java, though you can emulate Duck Typing in Java as well. Design patterns are suppose to be language independent, but some of them get implemented in the core of some languages. For example the Iterator pattern is implement in Java, Python etc. So we don't even realize that we are using Iterator patterns when we use Python or Java. On the other hand we manually implement Iterator patterns in C.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment