Question:
What programming language should I learn to be a good procedural programmer?
?
2014-12-19 01:34:42 UTC
Hello! I'm still learning Python 2 and almost at end. I'm stuck at the OO method, so I prefer to develop my procedural programming skill by learning other programming language! People says that to be a good OO programmer is to be a good procedural programmer first. So, what you would recommend me to start with? I think wanna start to learn C after this because it doesn't have OO to apply in it while it's the most-wide used language today and also it's very powerful for it's category. I don't have much problem to learn the concept since I got what Python teach me to learn other language more ease. So, I chose C...will you recommend me that and tell me why and if not..also please tell me why so I can view from different perspective. Thanks for advance!
Eight answers:
tumbleweed_biff
2014-12-19 05:58:37 UTC
Procedure programming: Fortran, Pascal, etc.



OOPs isn't that difficult.

Think of a car. It is an object. You then interact with the object by calling its methods such as "accelerate", "stop", etc. As the one using the object, you don't need to know the mechanics behind performing an action, you just use the interface - pedals, steering wheel, switches, etc.



When writing OOPs programs, you look at the object, decide how your are going to interact with it and the data it contains, and then write methods to access, modify, etc, the data within.



Inheritance is how you reuse a lot of code. Start with something like "living creature". What are all the data elements that are part of a living creature: consuming energy, disposing of wastes, etc.

So now we move to mammal. Everything that is in living creature is inherited by mammal, but then there are unique elements to mammal such as "live birth". Next move to feline, inheriting the elements of living creature and mammal, add 4 legs, tail, whiskers, etc. So the object cat has all of the properties specifically written into it, plus all the properties and methods written for the objects which it inherited.



So writing a program comes down to implementing objects and then using their methods. It doesn't matter what sequence you use to access the objects, you can access any one at any time where procedural code requires you to perform step A, then step B, etc. OOPs allows you to do step B, then step C, then step A, then step F, etc,.
?
2014-12-19 03:51:43 UTC
C++ is a modern language. C++ is more to generic and OO programming. C++ is resemble from C (and some kind ANSI C) and one level far from the 'engine'. C++ and C is not a same language and C++ don't tell you 100% of how computer is working on the background like C did. Also, C++ is specialized to programming upper than embedded software like Operating System. It good to create video games because the powerful and applicable mindset/method of OOP in the C++. RIchard J, C++ is far more harder to pickup even the syntax is far more short than C. C is a small language that provide a same level of C++. C more powerful than C++ because the procedural language method in it. C++ can't do everything C can do because C is the most-wide used and the most compatible platform other than Java. That make C libs bigger and standard to use. Plane is modern and that not mean you just need to go to grocery using plane. The creator of C++ himself said C++ is far more complex than C because the big features in it. Learn a low level language like C is better to learn the 'whole' concept in programming. C++ is just good to create software that not located at the metal/hardware. C just create a powerful monster that hard to pickup unless you learn from the ancestor. and that mean...The Powerful C
?
2014-12-20 18:10:55 UTC
Greetings!



For procedural programming, I prefer C. So yes go ahead. You will also need your C knowledge to move to C++ programming because what you do in C you can also do in C++ with a little adjustments on header files.



What I like about C is that it is so simple yet powerful and robust. You can also write some low-level assembly code in it. C is good for robotics too as it makes it easy to interface with the hardware.



There are various C tutorial websites on the internet. You will have no problem learning it. Start with acquiring the text, "The C Programming Language by Kernighan and Ritchie." It is the best book for me when you want to learn ANSI C.



I wish you well.
Richard J
2014-12-19 02:57:05 UTC
Try c++ first. It's easier to pick up than some aspects of c and you don't have to create classes and objects. You can do everything c can do and then some. So you'll still learn c as well.
Di Li
2014-12-19 03:50:39 UTC
You want to learn C, and you're coming from python? You better go to C++ , C is too "low level" for you in my opinion. C++ is also extensive with objects, and C code works in C++ as well. Don't go to C from Python...It will look alien to you and probably be extremely frustrating.
Jim
2014-12-21 22:08:06 UTC
your "best answer" is trying to teach you OOP when you want procedural programming. go for C. it's very procedural and modular. it is also great for interfacing to other languages through DLLs and writing language parsers and lexers with.
Noopur
2014-12-19 12:33:05 UTC
Start with C , then learn C++ .

Or you can learn Java or Python.
taniya
2014-12-23 02:09:06 UTC
C C++ best for learn.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...