This is a question I've had in the back of my mind for awhile now, not specific about any one language but just in general. I've programmed in languages that are object-oriented to the extreme, like Java and C#, and also languages like JavaScript, Python, VBA, and (as I found out yesterday) AutoHotkey; this second group of languages supports OOP but doesn't necessarily require it. And for most of them, a beginner doesn't even know there are any "objects" involved - I wrote VBA macros for two years before I ever heard of OOP. So I guess in this post I'm talking not so much about whether a language is technically OO but more the style or process of writing the code.
As an example, let me use AHK (since that's what everyone here is likely to know
![Laughing :lol:](./images/smilies/icon_lol.gif)
Code: Select all
^n::
Run Notepad
MsgBox Time to get your code on!
ExitApp
Code: Select all
function go(){
var txt = document.getElementById("someInputField").value;
alert(txt);
}
![Laughing :lol:](./images/smilies/icon_lol.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
So whether we're writing in AHK, JavaScript or whatever, what do you think are the advantages and disadvantages of using OOP vs. another approach? I have my opinions about it, but I thought I'd get other programmers' perspective on the subject.