by Doug Coulter » Wed Oct 28, 2015 8:58 pm
Hey Robert. For those who don't know, Robert is one of the people I frequently talk to on G+, and I'm kind of mentoring him on software, which is why I got him stuck on perl (my own favorite duct tape for what I do) as a way to start programming.
Yeah, I know, there are other choices...I like perl for what we are doing here, and it's still the language of choice for we old neck-beards who have to make things work in a hurry and connect large chunks of functionality together (databases, web servers, CGI's, data aq, plotting, formatting, converting, system control, service daemons, and on and on). Fewer lines and more understandable at first than most strongly typed languages.
It does "give you enough rope to shoot yourself in the foot" but one need not write code that can't be read. Most of mine looks like C, the reason being, I have to go back and maintain it myself often enough that I make it very clear and eschew most of the "random line noise" tricks. As I learned many years ago, one can even write C++ in C (the ++ used to stand for pre-processor, after all) - all you need is discipline. But since I have it, I don't like having it forced on me when it's a bad fit for the problem at hand - not everything is objects, despite java's insistence on that.
As for encapsulation, I've seen this in a C++ header file...
#define private public
And people whine that perl doesn't keep you out of its object living room because it has a shotgun - it simply expects you to have some manners.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.