I've Got 99 Problems, But Worrying About a Return Type Isn't One

20 Jan 2021

JavaScript, so far, rocks. This is coming from someone whose first language was C. Don’t get me wrong, C is amazing. But JavaScript feels like a mirage: too good to be true. As you can tell from the title, the most shocking thing I found was the lack of formality when declaring functions. In fact, I was hardwired to think that you must ALWAYS specify what your code is doing so you can always expect what is going to happen. Not having to declare a return type, not going to lie, makes me feel uneasy. This also makes my code extremely error prone, I’m still getting used to JavaScript’s rules of scope, domain, and classes (Or should I say pseudo-classes?). This leads me to my next point, just how good is JavaScript for software engineering?

I by no means am a professional, nor do I claim to be. I can’t tell you about all of the security features JavaScript may or may not have but what I do know is that JavaScript makes coding a lot more efficient when compared to C. For one thing, no pointers! And did I mention: no pointers?!

Pointers aside, perhaps the point of software engineering is not to be proficient in as many languages as possible but to understand the big picture. I remember Gerald Lau, former academic advisor at UH Manoa, said that there are only a handful of things that a software engineer should be able to do with a language such as reading and writing, accessing and updating data, etc. In this case, I see no fault with JavaScript. It offers the user (engineer) an efficient way to handle data.

Also, JavaScript makes the WOD’s less intimidating. As mentioned above, not having to worry about return types when returning from a function is pretty amazing. but there are many other ways that are simplified by JavaScript: declaring variables, passing argument types to functions, etc. Perhaps it is this simplicity that allows us to more effectively approach the athletic style of coding, not having to worry so much about syntax and types allow us to more clearly deal with the problem at hand and not any residual confusion with a strict language.

Despite the many benefits and conveniences of JavaScript, this is not to assume that WOD’s are not a problem! The WOD’s do bring on anxiety, perhaps that’s the point, periodic exposure to reduce overall anxiety. But speaking as an inherently anxious person, I can’t say that this method of periodically induced trauma is always well tolerated. Anyhow, here’s hoping for manageable anxiety levels during WOD’s. Like the title says: I’ve got 99 problems, but thankfully worrying about a return type isn’t one.