|
|
|
|
|
by singingfish
1514 days ago
|
|
This is one way to think about it. If you take your glasses off and squint a little, underneath perl and python work in extremely similar ways, and basically do the same thing. Python is a dynamic language created to provide uniformity of syntax. Perl is a dynamic language designed to provide flexibility of syntax - wherein it has natural language features like list/scalar context. Both of these approaches have their advantages. I have a saying I overuse: "Python helps you think more like the computer does, Perl helps the computer think more like you do". The consequence of this is that python is good at helping people think about tasks that the computer is good at in - like statistical problems. On the other hand perl is good at helping to contain the mess and chaos of the real world in a way that makes it more tractable for the computer - which is why it remains popular in the recruitment industry backends and other less tidy business areas. Perl's very raw unvarnished object model is in fact based on python's, so it is very similar, but it's also built for flexibility. This means object models like Moo[1] which are really nice flexible and done right make it really easy to write extendable applications. Implementing python's object model in perl (i.e pretty much the exact specification) is easy. However you can't implement perl's object model in python except by messing with the guts of the python interpreter. I haven't done any commercial python - I only have a passing aquaintance really from messing with sympy and the like. But boy perl has been good to me. I earn a good living in an interesting job and I can maintain interests out of work as well. And I haven't had to look hard for work for years. Of course currently I'm neck deep in recursive SQL queries. [1] https://metacpan.org/pod/Moo - My favourite job to date was building a back end to spin up network devices, that got one gentle refactor after the initial implementation and was then subsequently extended to three or four completely different network device architectures extremely quickly. Mostly by virtue of making almost every object property read only and memoised on demand (extensions to existing methods would are likewise inlined on complilation - all done with object composition rather than inheritance too for an added layer of sanity) |
|