I wouldn’t have thought that a language that pretty much threw out all of the rules of good language design would come to occupy a place in my heart, standing with the likes of my romances with C++. Let me take you on a journey…
I started my career like many other computer programmers of my time in the C/C++ era. I mastered my pointers. I mastered pointers to pointers. I mastered pointers to arrays. I mastered pointers to arrays of pointers. How many stars is that, ***?
But then things changed.
Direct access to memory was now looked down upon. In came the garbage collectors and took away the pointers. Only embers remained, NullPointerException — then your program died. Ouch!
Programming languages were focused on making things safe. The clever stuff that only few programmers cared to understand was removed so that large teams of programmers could work away, drones building software? The clever stuff was clever, but hard to debug. Companies got worried. What would happen when their star programmer resigned? Who would debug the *** they left behind?
I think it started with Java. It must have…
You have to declare all the possible exceptions your method can throw. And the person using your method will have to handle them all, or re-declare them. The compiler was watching all and getting harder to please. Try, what a pain in the, NullPointerException. Catch, should it have been a NullReferenceException, I wonder? Did they get the naming right finally?
I understood the reasons but I missed the clever stuff you could do in C++, if you knew how to do it safely and properly.
Meanwhile Microsoft developed C# and incorporated some of the best features of popular languages like C++, Java and Python. C# is a fantastic language to work with. Thank you Microsoft.
Microsoft had its pulse on what programmers loved. They brought back the good stuff like function pointers, err no, delegates, ahem. Lambda functions, high-five Python. And string, after all “the world without string is chaos”1Lars from Mousehunt (1997). Any C++ programmer worth their salt has attempted writing their own String type that they wanted to be better than any other out there, but landed up being full of bugs, except std::string of course. And C#s string works with Unicode, no fuss. C# gave me hope. Await.
They saw the potential of this nascent language that did not shoehorn you into types or classes of objects.
Software engineering is maturing as a discipline. Was it ruby? on rails? The tools got better. I mean Objective C, Apple, seriously!? But with XCode by your side completing the code, even that was manageable, stay strong. Not just code completion, there were helpful tips from the compilers. Take C#, not many complaints about how it is unhappy with your code, just gentle reminders in the right direction, like that variable you perhaps forgot to initialise. But there was more awesomeness in the works, like refactoring by renaming functions and extracting parameters in Visual Studio. And dependency management. A golden NuGet.
Unit-testing got big too. Clever mocking libraries, test runners, coverage analysers. The tooling around programming just got so much better.
Thinking was changing, again. You didn’t need a large team of programmers to churn out code. More didn’t mean faster. The waterfall had dried up and you had to be Agile. The marketing department went to town. They sprinkled it liberally over the corporate website. Do you Agile to survive or do you survive to Agile? What’s your mantra? Got a coach yet?
Languages still remain primarily safe. No, you aren’t allowed direct access to memory like in the old C++ days. Those were bad practises. Still cool though, being able to de-reference pointers to *** in your head, I think. But yes, the safety offered by modern programming languages is reassuring. Delegates, lambdas, async. It is well thought out and cool in its own way, I guess.
The familiar curly bracket? A false sense of security. Your vars are still in scope.
But I know some others persisted. They saw the potential of this nascent language that did not shoehorn you into types or classes of objects. They came up with JQuery, JSLint, promises and polyfills. It was something about it being fast, asynchronous, single-threaded they said. Something nimble about it I didn’t seem to get then. I felt it was unsafe and safety was paramount wasn’t it? But the ones that persisted had promises to keep, and miles to go. And they kept going, building then breaking pyramids of doom.