+ 2
C# or Python as a first language
Hi, I've decided to fulfil a dream of mine and learn to code, hopefully professionally. I'm more interested in back-end, but I'm undecided what my first language should be. I'm considering C# or Python. I know everybody says Python is great for a first language, but I've read that you basically need to be a math teacher to be proficient in it. Also, it seems to me that the syntax is significantly different from C, Java and etc. A friend of mine recommended me C#. What would you recommend? Thanks, Kaloyan
3 Answers
+ 2
Python is a 4GL (4th generation language), whereas C# is a 3GL like Java and C++.
4GL doesn't mean it's better, it only means that it abstracts a lot more functions so you need less code and less knowledge for many tasks.
With Python, you will get results way faster. BUT starting with a 4GL and then going "back" to a 3GL (which you'll want to do sooner or later) is a lot more difficult than the other way.
Therefore, I recommend NOT starting with Python.
I'd also like to recommend starting with C++. It's a bit more difficult than C# (and a completely different language, despite its name), but you'll also learn a bit more from it. But it's your choice, both languages are great.
+ 1
I would go with python:
1. It runs on more platforms
2. It has a REPL, which means you can work with it interactively, enter rach command and see the result.
3. You can achieve the same tasks in python with less lines of code.
Ofcourse C# has its place, it is a compiled language (but run by a virtual machie, like java), and probablt executes faster tban python, but for learning s first language, I think python is more suitable
(REPL == Read Eval Print loop, i.e. Any language that has an interactive prompt thst takes your command, evaluates it, prints the result, and loops for the next command)
+ 1
First, python is not really a 4GL language.
Second, the whole concept of 3GL vs 4GL is an ancient relic from the 1970's, and mostly refers to what was once known as "application generators"
With languages such as C# having huge selection of libraries, making it as functional as python.
And last, the "modern 4GL" python began development in 1989,while the "ancient, 3GL" C# began development in 1999.
https://en.m.wikipedia.org/wiki/Fourth-generation_programming_language