Imperative vs. component based programming [closed]
- by AlexW
I've been thinking about how programming and more specifically the teaching of programming is advocated amongst the community (online).
Often I've heard that Ruby and RoR is an ideal platform for learning to program.
I completely disagree... RoR and Ruby are based on the application of the component based paradigm, which means they are ideal for rapid application development.
This is much like the MVC model in PHP and ASP.NET
But, learning a proper imperative language like Java or C/C++ (or even Perl and PHP) is the only way for a new programmer to explore logic itself, and not get too bogged down in architectural concerns like the need for separation of concerns, and the preference for components.
Maybe it's a personal preference thing. I rather think that the most interesting aspects to programming are the procedural bits of code I write that actually do stuff rather than the project planning, and modelling that comes about from fully object oriented engineering or simply using the MVC model.
I know this may sound confused to some of you. I feel strongly though that the best way for programming to be taught is through imperative and procedural methods.
Architectural (component) methods come later, if at all.
After all, none of the amazing algorithms that exist were based on OOP practice! It's all procedural code when it comes to the 'magic'. OOP is useful in creating products and utilities. Algorithms are what makes things happen, and move data around, and so imperative (and/or procedural) code are what matters most.
When I see programmers recommending Ruby on Rails to newbie developers, I think it's just so wrong. Just because you write less code with Ruby does not make it easier to do! It's the opposite... you have to know loads more to appreciate its succinct nature.
New coders who really want to understand the nuts and bolts of coding need to go away and figure out writing methods/functions (i.e. imperative programming) and working in procedural style, in order to grasp the fundamentals, first, before looking into architectural ways of working.
So, my question is: should Ruby ever be recommended as a first language? I think no (obviously)... what arguments are there for it?