3 ms·
Are there non-object oriented languages that are popular today? Python, Ruby, JavaScript, even PHP. I’d like to hear some things from people who only started p
by bluedino 6y ago
Are there non-object oriented languages that are popular today? Python, Ruby, JavaScript, even PHP.
I’d like to hear some things from people who only started programming in languages like that and know no other way, but have maybe learned C or something.
- ByteJockey 6y agoI picked up languages like that first and then picked up c later. I tend to miss lambdas more than classes in c. I'm not big on large class hierarchies, so classes tend to be more about conceptual organization to me. And throwing a bunch of related function pointers into a struct and passing a pointer to the struct itself almost kinda looks like a class if you squint hard enough. It keeps everything organized. Packing everything I need into a custom struct, coercing it to a void pointer, and passing it somewhere to emulate a closure, on the other hand, feels dirty.
- Jtsummers 6y agoWell, to the extent that TIOBE is good for anything I suppose it's good for this. The #1 language for March 2021 is C, a decidedly non-OO language. #2-8 are all OO languages or languages that promote an OO style. #9 is assembly (really?). #10 is SQL, hardly OO, it's a declarative language with no pretensions of OO-ness that I've noticed. #11 is Go which is only kind of an OO language, but not really in the sense most people mean when they discuss OO. Of #12-20, most are arguably OO languages of various flavors except for R, Perl, Matlab, and maybe Classical VB (only because I don't know exactly what they mean by that, how far back do we have to go to get to Classical VB? The fall of the Roman Empire? Is it primarily used with an abacus?). Below the top 20 down to 50, the remaining languages are mostly not OO languages, or their OO components are best considered a secondary or tertiary feature (Ada, for instance). So, yes there are popular non-OO languages today. No, they probably don't dominate in overall interest or use, at least outside certain domains. But people are even putting Javascript on microcontrollers these days so it won't be long before it's OO everywhere. Hell, OO (via Java) has already been to Mars. https://www.tiobe.com/tiobe-index/ https://www.tiobe.com/tiobe-index/
- bluedino 6y ago>> and maybe Classical VB (only because I don't know exactly what they mean by that, how far back do we have to go to get to Classical VB? The fall of the Roman Empire? Is it primarily used with an abacus?) funny enough I worked at a place a year ago who’s main language was VB6 and they were terrified of objects. Mostly exposed to it on the web side with python and php written by two new developers Oddly some of their best code was some VB6 using OOP that someone had snuck in sometime years ago.
- marcosdumay 6y agoPython and PHP aren't object oriented languages. They are structured languages with optional objects. Javascript is object oriented but has it's own definition of "object" that differs from every other language, so people try to abstract it away and write most of their code in some other paradigm.