2019-07-05 01:54:17

Hi guys.
So I was wondering what programming language is easier to learn for an almost beginner in programming. I mean, i know html, some php, and some bgt, but I want to learn c++ or python. I'm not asking witch is better, just witch is easier to learn for an almost beginner like myself.
Thanks in advance.

2019-07-05 02:15:55

If its a choice between the two, I would often suggest python. Being a managed language it helps abstract some aspects of memory management and offers a subjectively smoother syntax making it easier to learn. It also has a lot of well maintained libraries, lots of documentation, and a strong community behind it that can help out if needed. But ultimately what only really matters is whichever you feel comfortable using, some people enjoy the technical challenges of learning C++ for example. Either way, all languages share certain similarities like loops, variables, etc. so which ever you choose, learning one helps make learning others easier.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2019-07-05 07:44:49

I'd advise to learn both.
C++ and Python in combination give you a lot of power.
With Python, you cannot develop system software, but you can do it with C++.
If you don't have enough performance with Python, you can not search for a solution inside Python, but optimize with C++.
Answering your question I can say that Python is simpler. But Python will teach you wrong programming.
For this reason, I'd advise starting with learning C++, and then learning Python along with it.
But it all depends on your goals. If your goal is to develop applications or games, I'd look at C#.

2019-07-05 09:31:13

Python does not teach wrong programming... but it is true that it might not be to some peoples tastes. C++ and other unmanaged languages are more preferable when working with lower level hardware though, and it can be used to augment Python and C#. When it comes to just starting out however, I wouldn't recommend taking on too much at once and sticking with one language before tackling another. As I said though, what matters is what your comfortable with, be it C++, C#, or Python, its up to you.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2019-07-05 09:47:25

magurp244, With Python you will not understand the full meaning of encapsulation for example.

2019-07-05 09:50:51

Damn magurp, you surely have a lot of patience.

Paul

2019-07-05 10:27:31 (edited by magurp244 2019-07-05 10:28:40)

Encapsulation is a product of Object Oriented Programming, which is used to hide values or state of a data object within a class, preventing unauthorized access to them. Or put another way, its a function or data that can only be accessed from within the class itself.

Python has systems in place to emulate behavior for encapsulation, but unlike languages like C# or C++ it has no mechanism that effectively restricts access. By default all members are public, and by using underscores members can be declared protected or private as a matter of reference. Protected members are more a matter of reference and can still be accessed or modified, but private members as indicated with two underscores will throw an attribute error on any attempt to access them.

This is in contrast to C++ or C#, which have more explicit Public/Private declarations, but the underlying concepts and principles are still the same. You can argue that they're different, and they are, but differences like these between languages are not uncommon. C isn't Object Oriented for example, and your not going to use either Python or C# for lower level hardware work. Its difficult to argue a "proper" application of these concepts, as it depends on the use case and applications you have in mind. If people have a need for strict public/private declarations, it only makes sense to use a language that more strictly enforces it, that doesn't mean languages that don't are necessarily wrong.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2019-07-05 14:41:38

Rofl, encapsulation isn't taught by the language, encapsulation is a technique, which must programmer learn and understand, using it whatever language he / she uses. It must be taught by teacher or course. If programmer doesn't understand why it is important, it is the most easy thing to write

public:

In C++ and make bad object model. I'm talking from my own experience. big_smile

To the original question, Python is of course easier, much easier to learn, just pick up a good course, which will teach you all required principles not just of Python, but also programming, oop and other important things. C++ is full of details behind these techniques, which are hard to grab, when you even don't know techniques themselves. After you learn Python, it shouldn't be that problem to grab also C++, although there are many syntax differences between these two languages, not just managed / unmanaged, but also dynamically typed / statically typed, so it might take somewhat higher attention to get used to it. But that's all, programming principles are the same.

Best regards

Rastislav

2019-07-05 16:12:06

I was actually considering c#, but then i heard that it's going to be unsupported soon. is that true?

2019-07-05 16:37:06

Without checking the net for resources on that matter, I highly doubt that C# will be dropped anytime soon.
Best Regards.
Hijacker

2019-07-05 17:16:10

@9: where did you get that? With that many servers running Asp.net, I don't see any reason why C# would be dropped any soon. And not just that, it's still expanding. Just check out Blazor:
https://dotnet.microsoft.com/apps/aspne … pps/client
which has been built recently and allows you to run C# even client-side, like JavaScript or Dart, with even higher speed, because it compiles to web assemblies instead of js code.
You can also check out articles like this:
https://fluxmatix.com/en/blog/10-reason … ng-in-2018
which are summing up, why C# is still not only language of secondary use, but first class tool able to compete with young languages like Rust, Ruby or Dart. and also its biggest competitors - Java, Python etc.

Best regards

Rastislav

2019-07-05 17:26:52

C# Is a Microsoft product. Microsoft the king of keeping on legacy products and continually to support them a long time after they should have died a quiet death in the graveyard of abandoned software.

While Python generally has a cleaner and more beginner friendly syntax, It is more a matter of the teacher or tutorial you use. A Bad teacher won't be able to teach even the easiest of programming languages effectively.

Also teachers and people trying to give advice who spout off in their corner about how you shouldn't pick Joe and Nick's Super Unique Coding Kit because the way they handle pointers is bad or the Memory management is slow and buggy; you should ignore them. Not that they aren't right. They may have valid points. You as a beginner though do not care about advanced pointer allocation or the memory layout or your program in ram. Eventually you might, but for now just learn the basics. If you get there one day, go shout along with the critics about how Joe and Nick's Super Unique Coding Kit is so buggy beyond belief that you couldn't believe that anyone in their right minds would even run it on their computer.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

2019-07-05 17:53:33

jonikster wrote:

I'd advise to learn both.
C++ and Python in combination give you a lot of power.
With Python, you cannot develop system software, but you can do it with C++.
If you don't have enough performance with Python, you can not search for a solution inside Python, but optimize with C++.
Answering your question I can say that Python is simpler. But Python will teach you wrong programming.
For this reason, I'd advise starting with learning C++, and then learning Python along with it.
But it all depends on your goals. If your goal is to develop applications or games, I'd look at C#.





Although i agree with your statement above on Python. Bringing this issue on each topic wouldn't benefit you at all.

2019-07-05 18:13:17

@13, the statements made by Jonixter are completely incorrect. As already stated, encapsulation is a technique. There is a difference between a technique used for access control and something that a programmer *must* learn in one and only one particular way. Rust uses encapsulation, though at a more limited form: there is no 'protected', 'internal', etc., modifiers; there is only 'pub' and no 'pub'. Something that is not 'pub' in a module is 'private'.
Also, I would not recommend you start off with C++.Go ahead if you like, but it is a very difficult language to fully understand if you are a beginner, and you will be diving into a world where easy is thrown out the window. smile In all seriousness, C++ is not easy any more, though C still is (go figure that). By that I mean C is simpler than C++ will ever be, but is still not easy compared to Python, for example. As Kyleman123 said, unless you absolutely need to (i.e. OS kernels, device drivers, embedded development, ...), don't worry about how your program is mapped into memory or how your pointers are laid out. I won't write a lecture on conservative programs until you've got a bit more experience under your belt though. big_smile
Also, C# is not going away. MS is producing .NET 5, as a matter of fact, merging .NET core and the .NET framework into one entity that is cross-platform.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-07-05 18:46:28

C is easier than C++? Sorry, but i'd deffinitely disagree with that. It starts with strings not being actually being available, pointers (not the smart ones) and the operations you can perform with them, digging up errors/debugging due to exceptions not being available... I could probably go on with that list for a while.
In fact, C++ is not just made to add in OOP, but also to simplify things with smart pointers, exceptions and more. If you really learn C++ from the get go without mixing it with older, outdated C methods (which still have their purpose, but are probably not interesting for newbies), you'll learn an easier language than C for sure.
Best Regards.
Hijacker

2019-07-05 18:54:50 (edited by jonikster 2019-07-05 18:56:20)

@8, I agree, C# or Java can teach object-oriented programming better than C++.

@Ty, The truth is that C++, Java and Python are more independent than C#.
C# will not cease to exist anytime soon, however, the way C# defines is Microsoft.

@Ethin, No theory can teach you without practice.
Python can give bad practice.

@Hijacker, C syntax is simpler than C++ syntax. But in solving problems, C++ is simpler than C.

2019-07-05 19:59:29 (edited by Ethin 2019-07-05 20:00:57)

@16, ohmygod dude, stop jabbering and go learn something, m'kay? Python does not teach you bad practice, it just makes you do things differently. C++ is not easier than C is in solving all problems. It is in some problems, but C is better for some problems, particularly when programming for embedded systems. Python, C, C++, Java, C#... these are all independent programming languages. They don't rely on each other to function. A python interpreter can be written in Rust (one actually has already been written in Rust) or any other language. The MSIL spec is open and you can write an MSIL interpreter in any language you like.
Now, I'm done with you and your nonsense. I'll let those who actually have patience for you to deal with you -- I have better things to do than to attempt to educate someone who can't use Google and who doesn't want to learn.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.
My Github

2019-07-08 14:34:33

C++, hand down.

2019-07-08 14:44:22

Python imho is easier but you should really learn both.

you like those kinds of gays because they're gays made for straights

2019-07-08 16:56:31

@jonikster
You keep saying that Python can give bad practice. Whatever that means.
But lol, for real, please give me some examples.
Just because a language is meant  for 1 thing and it has different  sin tax. Does not make it a bad language to learn and use.

Have a lovely day.