This document discusses factors to consider when selecting a programming language for a project. It outlines dimensions for selection like capabilities, productivity, and costs. Key criteria include whether the language can meet expectations, development costs, ramp up time, and community support. The document also evaluates common languages like Java, PHP, Python and Ruby based on their strengths and weaknesses. It predicts trends in language popularity and adoption of functional programming concepts.
2. Why language selection ?
There is no universally superior language
Language selection is fitment of language
strengths and weaknesses to a context
Language selection often has long term
implications including those of business
capability, cost and technology lock-in
It is therefore a technology + management
decision
3. Dimensions of Selection
Capability : What the languages can / cannot
do
Productivity : How efficiently can one write
programs using the languge
Ramp Up : How easily can you get online
Extraneous Factors
Costs : What are the costs of using the
language
4. Questions to be answered
Can the language deliver on expectations ?
What is the cost of delivering on expectations
How long does it take to write and debug
code ?
If I don't already have the skill sets what is the
cost and time required to build them ?
What is the support structure available from
community and corporate groups ?
What are the hardware and deployment costs ?
6. Object Orientation
Encapsulation / Information Hiding
Inheritance
Polymorphism
Are all types objects ?
Are all operations performed by sending
messages to objects ?
Are all user defined types objects ?
7. Functional Programming Elements
Higher Order Functions
Code Blocks
Generators (potentially infinite data, lazy
evaluation)
List operations eg. map / reduce etc
Closures
Traditional : Haskell,Erlang
Upcoming : Scala, Clojure, F#
8. Static or Dynamic Types ?
In static typing, type is associated with a
variable, in case of dynamic typing, it is
associated to the runtime value
Thus dynamic typing cannot often infer type
until at runtime
Static typing catches more errors at compile
time. Makes debugging easier
Dynamic types allows more flexibilities (eg
metaprogramming) and lower compile idle
times
9. Metaprogramming
Inspect existing classes / methods
Instantiate classes / Invoke methods using
dynamic class / method structures
Create new classes / functions / methods on
the fly ?
Modify existing classes / methods on the fly ?
10. Productivity
Expressiveness
Eg Wikipedia : Comparison of Programming Langs
C / C++ =>1, JAVA => 1.5, Perl => 6, Python => 6.5
Speed of writing code
LOC per hour can also vary based on language
http://page.mi.fu-
berlin.de/prechelt/Biblio/jccpprt2_advances2003.pdf
Compilation overheads
IDE speeds
Refactoring capability
11. Performance / Scalability /
Reliability
Performance : How fast can the programs run
for given hardware
Scalability : How easily / cost effectively can the
software be scaled to handle higher loads
Reliability : How fault tolerant can the resultant
software be
12. Extraneous Factors
These are very important factors
Customer Preferences
Architecture Standards
Frameworks and Libraries
Community
13. Deployment characteristics
Hardware Requirements
Ease of cloud / virtualised hosting
Hosting requirements for Small vs. Medium vs.
Big apps
Clustering capabilities
14. Adaptability / Agility
How quickly can you change based on
changing requirements / objectives
Language is only one part of the mix
Frameworks
Design
Processes
15. Costs
Training
Writing and Testing code
Development Infrastructure
Deployment Infrastructure
16. Checklist
What do my customers want
What does my architecture body state
Can I meet performance / memory / app
specific constraints ?
What is the performance sensitivity
How critical is time to market
How critical is adaptability and agility
How critical are the budget constraints
How quickly can I ramp up
What is the available community
17. My opinions on language futures
These are my own
These are empirical
These are subjective
Languages under pressure :
Java under pressure due to productivity issues
PHP under pressure due to performance / hardware
/ cormplex topologies
Python / Ruby under pressure due to smaller
installed base and multicore concerns
18. Trends
Innovation in Web development is maturing
Web and Pre-web architectures are both
starting to get used
The VM is the new OS
CPUs/Disks/RAM/Networks have grown fast
enough for traditional transaction processing
Service Integration becoming critical
Scaling, Multicore becoming important issue for
many apps
19. Java
The big daddy - #1. But high entry barriers
Long time to train, high requirements to deploy
Low development productivity
Superb performance, scalability, community
Multi threading powerful but tough
Considerable risk from other languages on the
JVM eg. Jython, JRuby, Groovy, Scala, Clojure
Likely to loose share to competition
20. PHP
Language with lowest entry barriers
Easy to learn, easy to train
Large community and supporters
Phenomenally wide libraries coverage
Scaling up is feasible but costs prohibitive
Tougher acceptance when web + non web are
used together
Unlikely to change share much due to a defined
niche
21. Python / Ruby
High productivity and capability languages
Have small but vibrant communities. Finding
trained people can be tougher
Excellent Framework support
Current runtimes have difficulties in multi
threading
Lot of investments still continuing in VM
development.
Likely to continue to grab more share.
22. Functional Programming Langs
Lot of current interest. Am studying these with
great interest.
Primarily useful for computation / algorithm
intensive apps. As yet am unable to find them
useful for typical CRUD apps
Maturing still in progress. Too much rethinking
and retraining required currently. Many items
still unclear (eg. ORMs, state maintenance,
performance)
Invest in short term only if very obvious benefits
Suggest incremental FP usage to learn more