Search posts, tags, users, and pages
Unless your use case is mostly around rapid data analysis and prototyping of statistical models (Python's sweet spot), both have better alternatives in the modern world.
Care to list them and what makes them better? Other than web frontend and mobile development (for obvious reasons), and low-level programming (for practical reasons), I'm yet to deal with a platform where I wouldn't use python.
Web backend in particular is one where almost everything but python is an absolute annoyance to work in.
Funnily, in data analysis, many say R is a better choice. I don't agree, but I've at least seen compelling arguments for that particular case.
I will try to answer this more objectively, but please take any opinion with a grain of salt because I have not written any serious python code in altleast last three years.
I used to use Django for web programming and python scripts for basic automation and graph plotting long before but have since switched almost entirely to Ruby and Javascript and am looking forward to using newer entrants like Kotlin in near future. I (intend to) continue working in infrastructure and web domains so I will restrict my opinions to these fields.
If you need a flexible dynamic language for infrastructure automation and scripting ruby really shines in its flexibility for facilitating DSLs. It is not a conincidence that most popular system orchestration tools facilitate primary APIs in ruby - eg. Puppet, Chef, Vagrant etc.
If you try comparing a python based solution like Fabric or Ansible to Chef or Puppet (I have primarily used Puppet), the extent of expressiveness offered by a language where you can intercept method invocations in run time and define and override core language features becomes quite apparent.
I have found ActiveRecord and Sequel to be surprisingly more flexible than Django ORM (I haven't actually used SQLAlchemy), and Mongoid is hands down the most elegant abstraction for MongoDB I have seen for any language (MEAN etc. included).
As a stack the breadth of Rails ecosystem goes much further than Django or Flask. The advantages of the immense flexibility of Ruby becomes quite obvious when you contrast the ActiveAdmin DSL with Django admin, which I have found frustrating to extend beyond the intended usage.
When it comes to JVM integration, JRuby and more recently Truffle are increasingly getting better where as Jython seems to have stagnated. And it matters because of the immense engineering effort that has and continues to go into the JVM platform.
For real time web applications, it is hard to ignore the presence of Node.js, JVM and BEAM. Popular posts on modern python's asyncio don't exactly paint a rosy picture of the landscape.
But what is more important than all of the above, is that the original targeted niche of python - a glue language for low level components written in a systems lanuage - is rapidly disappearing. Systems languages have grown to be surprisingly expressive and modern high level compiled languages (Kotlin, F#) have increasingly adapted themselves to be as succinct and productive (REPL, language tooling) as dynamic languages.
Thank you for your answer, I'll try to address it opinion by opinion:
That was longer than I intended, oh well.
EDIT: Grammar and more concise.
Hi Luis,
Thanks for taking the time to read through the post. I agree with most (not all) of the things you said, and yes you are right about the popularity of ansible, I should have checked the facts before posting the comment about popularity of my favourite tools - but the point I was trying to make was somewhat orthogonal to popularity and acceptance.
Given that Python is much more used in a wider variety of fields can be seen as evidence that Python is more flexible and facilitates DSLs.
I agree python is much more widespread, and given its ease of use for new-comers that is not coincidental.
However popularity is not a yardstick for flexibility of language and adaptability to DSLs. None of the tools you mentioned use a DSL at all.
For both Ansible and docker-compose primary configuration mechanism is YAML. In contrast Puppet's types and providers model builds upon a sophisticated object oriented DSL that adapts the language to the domain.
In fact more powerful languages in most cases, have a higher learning curve associated with them and hence they are often less popular than languages which can be learnt over a weekend.
How the configuration management tool works is a matter of preference, not a point of comparison of the language it's written in
How you configure the tool largely depends on what kinds of idioms the tool follows and that is very heavily influenced by the languages they build upon.
Many, many blog posts over the years paint a poor picture of both Java and Javascript (and, by extension, node and jvm). That's not really a point against Python, every language gets criticism.
The criticism was directed towards a very specific aspect of the python ecosystem (asynchronous programming) for which arguably better (less confusing, more well integrated, more scalable) options are available elsewhere (Node, JVM, BEAM). This is a very strong reason (among many others) the latter are important, and not just because they just happen to be in continued development.
I never intended to contest longevity of python.
In the world of technology nothing really dies. The question is if I start with something today, is that the best tool available for the job, given my current constraints ? And over the last years, I have mostly found that answer to not be python.