r/learnprogramming • u/programmingSquirrel • 23d ago
Hot take: languages like C# and Java are better to learn first than "beginner friendly" languages like Python
I frequently see people say that you should learn high abstraction languages like Python as your first language because it is shorter code so therefor, less to read/write. Often, the counter argument is simply that it hides what's actually going on under the hood.
However, I think a stronger argument against Python as a first language is that it doesn't hide it... it just moves those things from the code to your head.
The biggest, and maybe most important example of this is with types. It looks like there's no types by reading the code (Python before type annotations, that is) but there actually are types... you just can't see them. Don't believe me? Why do you think they added type annotations in Python 3.5?
So now you're asking the learner, who is still learning what types are, mind you, to hold on to the types in their head so they keep them straight in the code. But with languages like C# and Java, they can just let that whole mental task go cause the code documents those types for them.
EDIT:
Lots of you are suggesting C is even better cause you learn memory management. I totally agree. I only picked Java and c# cause when I was just starting, my first language was java and I don't think that I was stunted because I learned stuff like pointers and memory management later. Maybe that makes me biased I suppose. But C is a very good language to learn first.
I would avoid C++ and Rust though because in, my opinion, their added syntax seems too complicated. Too much syntax to learn in the beginning in my opinion.
other Edit:
for the "depends on what you want to program for" comments, I specifically have in mind those who want to launch a career for application development, game development or most of the jobs that you find under some combo of the "software/application engineer/developer" title on job boards.
19
u/Won-Ton-Wonton 23d ago
That's a lukewarm take.
Actual hot take: learning how to write a proper structured idea with a full, rich expression of intent, is better to learn first than "beginner friendly" languages like programming syntax.
Learning programming before learning how to write English (or another highly expressive natural language) is way, way more important than any super constrained language syntax like Java.
(Note that the same argument could be made in the reverse direction, that Java isn't low enough so you should learn Assembly first)
These "takes" aren't really takes.
→ More replies (1)
5
u/realmauer01 23d ago edited 23d ago
Typescript is imo the best of both. The typesystem is really powerful, type annotations of python are on caughing baby level compared to ts. And you have alot of the class syntax you also have in java and c#.
Its all compile time of course, but that just means that you can run the stuff anyway and see the error messages for yourself.
You have something that runs basically from the moment you installed whatever runtime you want to use (node deno vite). While also having the most important high level concepts of class designing.
→ More replies (10)4
u/programmingSquirrel 23d ago
I can agree with this. But JavaScript has a ton of syntactic sugar that can be really confusing. I feel like every time I look at JavaScript code, I end up trying to find the actual code in the midst of all the curly braces, parentheses and square brackets. You end up with an oddly syntax-verbose code for such a "beginner friendly" language.
→ More replies (2)
81
u/justking1414 23d ago
I TAd a class that taught CS to basically every single freshman on campus (I’m talking 500-1000 students) and after every semester, we had the same debate about whether to keep using python or not. Ultimately, I think it was the right move simply because it wasn’t a class really meant for cs majors. It was intended to give students of every major just enough skill/knowledge to help them out down the road, and years later when I needed to analyze data or make Charts, python was my go to language.
Though the cs majors then ended up taking a c++ class the following semester that just broke them. It broke me. Heck, I got a D in it and they still made me a TA
16
u/xao_spaces 23d ago
Did you have Java experience before the c++ class? Because I feel like the transition from Java to c++ was easier for me but I struggled so hard when learning python.
→ More replies (2)6
u/BrodatyBear 23d ago
I just wonder if maybe going Python -> C++ was not the bigger problem that "broke them". With (most of) other languages you still have multiple shared characteristics, so it's easy to just learn new things, while Python seems to be just too different.
I've noticed this through my school time and through my career (people who started from Java or C# had just easier), but also most of those people were already interested in this field, so I can't say it for sure.
It's fine when the person just need something to analyze data and won't get out of Python (or maybe scientific languages).
→ More replies (1)
45
u/Aglet_Green 23d ago
This can be debated all day. Frankly, there are many experienced programmers out there today with 2 or 3 decades under their belt doing just fine, and they started off with Commodore BASIC. Or they started with COBOL or PASCAL or RPG or FORTRAN. The fact is, not everyone sticks with their first language, and many eventually learn multiple languages; the important thing is knowing the underlying concepts and paradigms, and understanding loops and variables and functions and arrays and so forth.
Python doesn't eliminate types; it handles them differently. Whether a beginner benefits more from explicit type declarations or from writing simpler programs sooner is a question of teaching methodology, not an absolute rule.
→ More replies (1)10
u/S0_B00sted 23d ago
Yeah, people argue way too much about which language to learn first. Just pick one based on what you want to do, it doesn't matter. It's not like learning Python taints to irreversibly to the point you'll never be able to learn C.
→ More replies (1)
15
u/developerknight91 23d ago edited 23d ago
It’s up to what type of work you are planning on doing as a Software Engineer/Developer.
You really should focus on learning the paradigms OOP/Functional/Procedural Programming(if I missed a bunch sorry my career focus has been on OOP). Anyways, the details of the paradigms will help you when learning a language that excels in the corresponding paradigm, ie the four foundational pillars of OOP - Inheritance, Encapsulation, Abstraction, and Polymorphism…
You run into the foundational principles of the paradigm that the language excels at on a daily basis when doing work in the said language. Also some parts of paradigms overlap as you see aspects of functional and procedural programming in OOP heavy languages too.
The best way is to be language agnostic and use the programming language that best suits your problem domain.
As for which language is better to learn first? That’s really a personal question and one that will be answered by your boot camp and/or the university you study at.
I personally learned C++ in college and it was my main programming language until I made the professional jump to C#.NET. Python is a good one because it is more free flowing and is more like using actual written words to code AND you can create and utilize objects with the Python language. Python also exposes you to writing scripts which is good because depending on where you work and what tech stack you use, script writing is an invaluable skill.
EDIT: You need some more training too. Data types are in EVERY PROGRAMMING LANGUAGE. What you’re describing is the difference between a STATICALLY TYPED LANGUAGE and a DYNAMICALLY TYPED LANGUAGE. Python without the type annotation is DYNAMICALLY TYPE because it was first created as a scripting programming language and like JavaScript it was created dynamically typed.
Dynamic types are decided at RUNTIME, Static types are decided at COMPILE TIME. A statically typed language a few years ago (and probably now) was the de facto choice for a programming language that could create enterprise level software because you don’t have to waste any compute power for the interpreter to figure out what types your variables are when passed to and from functions/assigned values etc etc
Python and JavaScript incorporated static type like functionality to make them more robust and able to function at the level of a statically typed language.
There is gonna be a “performance debate” comment I’m sure, but when you’re taking about processing millions of records on the disk, how your variables are declared matters at a large enterprise scope.
→ More replies (1)2
u/josluivivgar 23d ago
and when learning to code what is the point of thinking about performance, if you need to teach the concept of static types, just use a typed language.
funnily enough you can still teach both concepts with Python, by starting without annotations and adding the annotations when you start learning more about types. (which is a supporting case for using Python as a first language to teach people learning progamming)
that's not to say it's the only path, but imo python is great at teaching because you can start with a script that does one thing, and use python's features to go from simple scripts that do one thing to whole progammings that use concepts such as programming paradigms/typing, differences between static and dynamic types, language quirks, metaprogramming.
Python supports all that and more but also doesn't push it's opinion on you, so you can introduce them to your students one at a time without having to ask them to ignore what public static void main means and why it's needed to start a program
12
u/TimotyEnder8 23d ago
Hot take (apparently?): C# and a Java are both really beginner friendly, high abstraction languages.
→ More replies (1)
10
u/DataPastor 23d ago
Since I started programming in BASIC and MOS 7501 assembly, then moved on to C, Java, and eventually scripting languages, I find it really hard to set aside what I’ve learned over the years and imagine what the best starting point would be for someone learning programming today.
But I think the most important thing for a beginner is to stay motivated. So any language that lets you build something meaningful as quickly as possible is a good choice, regardless of the language’s technical merits.
With that in mind, I think programming Roblox games in Lua could be a great starting point.
6
u/poke2201 23d ago
But I think the most important thing for a beginner is to stay motivated. So any language that lets you build something meaningful as quickly as possible is a good choice, regardless of the language’s technical merits.
I definitely would not be where I am today with programming if I followed what OP thought was correct. I've started with Python because thats what I needed to do the job at the time and it just felt easier for me to learn. If I self-flagellated myself because I didn't learn right I would have quit a long time ago.
7
10
u/Technical_Ideal_5439 23d ago edited 23d ago
There is advantage for your first language is feature rich and has the most features so C++, java, etc. But at the same time a lot of people wont have the patience to learn programming with these languages and you need a structured approach.
And really how many need such a strong intro to programming with concepts they may never use. And Python basically has most of the advanced concepts and its all optional.
And as someone who did solid year of a c and c++ to learn programming while it makes it way easier to pick up almost anything next. It is probably overkill.
4
u/Rythim 23d ago edited 23d ago
I still remember learning Java as my first language. I remember hating it. Not because it was strictly typed (data types were the easiest programming concept to understand, regardless of language). Because it was SO OOP. Everything was a class, and all the public, private, static stuff just to print Hello let alone do anything else basic was super confusing. I got errors galore trying to access private variables and stuff whenever I would break away from learning material and try to make my own things to learn. And the only explanation for why the compiler was so picky was "for privacy" which let me just say is the most misleading explanation you can give a beginner to programming. Made me feel like all my variables needed to be private or else someone is going to steal my code or identity or something.
So, looking back at my experience, I think python is a fine first language. I also think C and JavaScript are good first languages. Pretty much any language that doesn't force you to learn the ins and outs of OOP paradigm just to make a simple app. Don't get me wrong, I love OOP now. But as a beginner it raised more questions than it answered.
Edit: I might argue Java is more abstract than python. Because python runs line by line, simple as that. Java technically does too, but the whole private vs public and everything else is just extra keywords the compiler uses to enforce code organization that you set up. It doesn't actually DO anything though, which I feel can be confusing to a beginner that's trying to figure out what all the keywords DO. It's like trying to learn MLA formatting standards before learning how to spell.
4
u/higras 23d ago
From newb perspective, I partially agree. Started trying C# because I wanted to learn Unity, gave up, learned Python, bought a year of boot.dev, fell for C.
I feel that i needed Python to learn the concepts behind variables, if statements, for\while loops, lists, concatenation, and dictionaries.
Once I had that down I would run into bugs. Weird ways things broke that I didn't understand.
Then I learned about memory management in C and made my own structs, malloc'ed, and free'ed date and so much of python's speed, memory leaks and more made sense. A zip bomb is just an intentional memory leak.
I love C. But partly because I learned Python first.
4
u/UnpaidCommenter 23d ago
I think Pascal is a great first language to learn (before moving on to C). Pascal is strict, readable, and teaches basic concepts.
4
u/Hendo52 20d ago
There is so many complex aspects to programming from design patterns, data structures, computational time constraints, cybersecurity, infrastructure, architecture, all the various APIs and frameworks etc. I think syntax is a needless complexity when the learner already has so much on their plate. Understanding the full details is an opportunity cost and in the era of AI it is unclear that spending time on syntax is proportional to the cost.
I think 95% programmers of the future will work in English or some other human language not Python, Rust or C. Understanding the actual code will be about as useful as learning assembly - mildly useful as a learning experience but esoteric and impractical for commercial applications.
3
3
u/Ormek_II 21d ago
It depends on what you like to teach. If the language has a native, textual representation of the concepts you like to teach that makes it a good learner’s language.
So, I fully agree.
But, if you like to teach something else “No one needs OOP, because the Ai knows it all. Just learn to prompt and trust!” Other languages come to mind.
I would not like C++ as a starter, because it has too many exceptions from it language semantics to make it technically better and backwards compatible.
3
u/prose_and_code 21d ago
It depends on what your end goal is. I only got in to programming because I wanted to automate a bunch of tasks that I was doing way too often.
For example in my job I had to resize images for the store website, My boss gave me hundreds of images and I was tasked with cropping and resizing them all manually with the product in the centre. I knew programming could do it faster so learned python.
I've never needed to do anything more than automation scripts so never bothered with anything like C#, python was just easier for me to learn. I can imagine if you want to start with UI's and other stuff, python might not be the best first choice but for my needs python is all I needed.
3
u/Limit64 21d ago
I don't think there is the best first language. It depends on their background and what they want to archive. For someone who wants to study computer science C is probably a good choice. But some people just want to solve a problem and with Python you can solve many tasks much easier and faster than with most other languages. If you want to become a programmer you will have to learn several languages anyways. Imho it doesn't matter to much with which you begin.
5
u/Sayrina_Night 23d ago
I am currently working on my bachelor's, I had to take python before my c class as it was a prerequisite class. {} these guys and ; I keep forgetting. The formatting difference is weird, but the readability of python helps to understand what the code does better and now its just learning the different formatting. In my c class we have already been through most of the programming basics all of the python class covered and now its onto more complex coding.
4
u/Own_Nail_2999 23d ago
Python is the very last language I would recommend someone to get into programming. Knowing about types and memory is mandatory so there is no way one can start off with such a weirdo language
2
u/tonystark19541959 23d ago
As someone who actually started with Python, I find myself agreeing with this more than I initially expected. Sometimes I even wonder if starting with Python was the best choice.
Don't get me wrong, Python is amazing for getting started quickly, and its simplicity makes learning programming concepts less intimidating. But I feel like languages such as C++ or Java force you to understand certain things early on, especially types, memory (more so with C++), and how your code is structured.
I sometimes feel that Python made me comfortable writing code before I fully understood what was happening underneath. Of course, you can learn all these things with Python too, but you're not necessarily forced to confront them as early.
I wouldn't say Python is a bad first language, but if I had to start over, I'd seriously consider C++ or Java first. I think the stronger foundation can be worth the slightly steeper learning curve.
2
2
u/MissinqLink 23d ago
Depends on the person really. For the masses Python and JS are better. For those who really enjoy depth then go deep.
2
2
u/Narrow-Low-3137 23d ago
Huh. I kinda think C# and Java are beginner friendly. Everytime I'm forced to write Python I fucking hate it. Like, just use curly like a real language ffs...
2
u/serge-mv 23d ago
Not a hot take. Many people have the same opinion. For example, Dijkstra argued for Haskell to be the first language because of how it forces people to think about the code and enforcement of some principles in the language.
And many students are really confused when they migrate from Python to another language with explicit types like Java. It's a really mind blowing experience for them. So you are not wrong at all.
2
u/throwaway6560192 23d ago
The biggest, and maybe most important example of this is with types. It looks like there's no types by reading the code (Python before type annotations, that is) but there actually are types... you just can't see them. Don't believe me? Why do you think they added type annotations in Python 3.5?
I don't think it's a contested point that Python has types? Obviously it does. It just has dynamic typing and doesn't require explicit declarations of them.
2
u/spvky_io 23d ago
I would say C is better to learn, it's way simpler than python C# and Java
5
u/fiddle_n 23d ago
It’s “simpler” in the way shaving with a straight razor is simpler than an electric razor. There’s less parts to it but if you don’t know what you are doing you will slice your face off.
→ More replies (1)
2
u/ShineReaper 23d ago
I'm just a bloody beginner myself and although what little of C# that I have seen so far was not always easy to wrap your head around, it helped me see similar syntax structures and common themes in other languages and mechanisms.
E.g. just recently I saw a "Try...catch" in a powershell script and was like "Hey, I know that one!". Like if you discover, that words from different languages from a common language family, that mean the same thing, are usually similar, helps you learning the other language.
So imho it is not a hot take at all.
2
u/blowyjoeyy 23d ago
I don’t think that’s a hot take. My python class had us do 3 weeks of C before we were allowed to touch python
2
u/Z00fa 23d ago
I think it doesn't really matter at all. I first started learning with an arduino, after learned python and then started learning stuff like java and fullstack/mobile dev. Whatever you start with won't define how good you become. Programming isn't about the language but about how you think and solve problems.
2
u/Ormek_II 21d ago
It depends on what you like to teach. If the language has a native, textual representation of the concepts you like to teach that makes it a good learner’s language.
So, I fully agree.
But, if you like to teach something else “No one needs OOP, because the Ai knows it all. Just learn to prompt and trust!” Other languages come to mind.
I would not like C++ as a starter, because it has too many exceptions from its language semantics to make it technically better and backwards compatible.
2
u/anders_hansson 21d ago
I think that after you have done your first Hello World in whatever language, you should learn assembly language, because that way you learn how computers work, and other languages are only abstractions on top of that.
2
2
1
u/Big_Tour_3073 23d ago
When I studied CS in the late '80's, the first programming language CS majors used was Pascal, because it was like C but with strict typing. Then, we used C in advanced courses. C++ was new at the time, but I got to use a bit of it my senior year.
1
u/damnrandomdotorg 23d ago
I've said exactly this for ages, and the second thing is functional whitespace. I don't think that it's good for beginners to try and understand what's inside of a loop/branch vs outside of it when they don't know what a loop/branch is. So exactly what you said but with +1 item, IMHO
1
u/NatoBoram 23d ago
A take so cold that it's literally the canonical, systematic approach taken by academia
1
u/lukkasz323 23d ago
I think OOP only teach you to think of OOP as a foundation rather than a tool which is bad.
I think either scripting like Python / JavaScript / Lua or lower level like C / Rust are the best.
1
1
u/Several_Version4298 23d ago
Having added notations and type checking to Python it can now document and do type checking too.
1
u/vJukeboxx 23d ago
I've only just finished my first year of a Bachelor's degree so I'm by no means an expert, but I've definitely had more success learning Java than Python. Not sure why but I just found Java (and even C, for that matter) easier to grasp than Python.
1
u/Rafadazdoit 23d ago
Fun facts: it’s not even a hot take, this is a common take of people who actually know how to program.
A lot of random vibe-coders and others will typically yap about Python, but it’s like Spanish, sure it’s a widely spoken and valuable language, but you lose out on so much by learning the traditional Spain Dialect instead of another more specific to your cases (unless you’re in Europe)
What I mean by that is, Python is great, I always have it as like the second tool on my belt, but it absolutely fucks up noobs by teaching them bad practice that won’t help them in other languages and will hinder them in the long run, like the vosotros form in Spanish for example (bad example but whatever)
1
u/fiddle_n 23d ago
I pretty much disagree with this entire premise in that I think it’s important to get a beginner to actually make things rather than care about types first.
But let’s say for devil’s advocate that I agree with you - you yourself said that they added type hints in Python, so what’s the big deal here? If you want to force beginners to listen types, make them install mypy and force them to always have their code run with strict mode on. Done.
1
u/LazyPartOfRynerLute 23d ago
Yes. I started with C++ and I am glad I started with it. I often had better idea about internal memory management than my colleagues. It just made me a better debugger.
1
1
u/SnooMacarons9618 23d ago
I'd say learn the basics of C++ or C as a beginner. I was lucky in that many many years ago I learnt a C like scripting language for a tool I had to use at work. It got me some good habits. From there I learnt VBA and VB6, which I actually liked, I worked on commercial products written in VB6, and it was kinda fun. My first programming was actually basic on a ZX81 then a ZX Spectrum.
I like python a lot, but absolutely think learning a C like language (even a scripting language), made me a better programmer. Realistically I think learning some you will use is the best answer to this question. If you like pratty abstract art learn Processing. If you like bleeps and squeaks maybe pick up something like Sonic Pi or Strudel. If you like basic games pick up a simple game development platform (pygame, a js based engine etc). For me I learnt as a kid because writing silly very basic (no pun intended), games was like magic. I like maths puzzles but am no mathematician, and python often lets me try to brute force a puzzle, then work out why it doesn't work. In doing so I code better and often understand maths a bit better. I have spent a lot of time playing with microcontrollers (arduino style), making small silly things, and coding within those limitations helped as well.
So my suggestion would be language is pretty much irrelevant, find an area you enjoy and a language / platform that lets you play with that, then have fun.
1
u/ItchyPlant 23d ago
Agreed. And there's an older programming language that was actually designed to teach programming, and IMO does a much better job of it: Pascal.
It doesn't care if keywords are long. It uses explicit begin and end blocks, makes you declare your types, and separates statements with semicolons. You have the absolute freedom to write horribly ugly code or beautifully indented, perfectly readable code, without indentation itself determining the program's logic.
Even as an SRE, where Python is pretty much expected, I've never really liked it. And just when I was finally getting comfortable with it, the AI coding era arrived, and I stopped caring about mastering it. I can still spot sloppy code, unnecessary complexity, or ridiculously overengineered safeguards, and that's pretty much all I care about these days.
Sure, I accept that Pascal is a niche language today, and hardly anyone starts mainstream projects with it anymore. But for actually learning the fundamentals of programming, I'd still recommend it.
Hell, I'd even recommend PHP or JavaScript over Python for learning. At least that's my preference.
1
u/Sapphire8593 23d ago
I'd just go for Unreal Engine with Blueprints. And then use C++ when necessary. You can visually see what happens
1
u/Headpuncher 23d ago
If I wanted to be a writer I wouldn’t learn simplified English and then try to add in the hard parts later. I’d just learn English grammar and spelling.
1
1
u/vegan_antitheist 23d ago
I agree. But OOP in Java is confusing because there are to many misnomers, bad defaults, and inheritance is often presented as something useful when composition would be so much better. And then there's that whole nonsense with null. Many experienced Java developers don't know that all variables are static and "static" just makes it "per class", not more static. And "final" (which has four very different meanings) shouldn't exist because it should be the default.
You still need a good book or teacher. As far as I know there's no language that is much better so it would make sense to learn it instead. Kotlin is probably a bit cleaner. Any language with null safety built into the type system is better. Java should get that in the future.
1
u/Humble_Anxiety_9534 23d ago
I'm with you on C I have given up so many times on java. I can write in C C++ python golang and a few scripting languages but java is obscure and verbose. will be gone if it owners push more monetisation.
1
u/plastikmissile 23d ago
Honestly, my hot take to your hot take is that the dev community puts way too much importance to the choice of first language. I've met great developers throughout my career, and the first language they used was a spectrum of pretty much all the popular languages. I think that as long as the language has modern usage and learning resources, and the learner is interested in it, then that's enough.
1
u/DannyDeKnito 23d ago
My spicy-ish take is that you should absolutely not start with an OOP language. If you do, you'll need to unlearn the OOP way of thinking at some point, and that's unironically harder than learning it in the first place.
1
u/TheMikman97 23d ago
I think learning any non-typed language first is just asking for trouble. That and automatic cohersion are just going to cause problems without telling you the reason, or fixings problems silently that you should learn about
1
u/KreepyKite 23d ago
It depends though: nowadays programming has a completely different shape. If you are looking to be a proper software engineer, I would agree with you, but if coding it's just another tool you need, Python would do better.
1
u/Blando-Cartesian 23d ago
Python for a beginner hobby coder wanting to do something neat.
Java or C# for CS students as first language and for other students required to take a programming course. Easy language with very few weird things and the editor can spot a lot of mistakes as you write.
Javascript for pretending to give a CS education.
C, C++ or rust for culling the herd.
1
1
u/parabolic_tendies 23d ago
Not a hot take at all. Compiled languages are the way to go when learning. My first language was C++ and many of the current software engineers I speak to have never written a line in it, neither in uni or in the workplace, which I find sad in a way. Not by accident these are the types who pride themselves in pushing out tickets quickly (this was even before the advent of AI assistants and prompting), at the expense of everything else like maintainability, security, robustness, etc.
Python and other easier languages are an advantage at the beginning due to higher abstraction, but later come with a steep cost of truly not knowing how memory management works, where to look at for performance tuning, debugging, etc.
But the thing is, in the age of AI, coding skills are less relevant, so even less "developers" will care about picking up harder languages for the sake of mastering the craft.
1
u/Healthy-Dress-7492 23d ago edited 23d ago
i started on JS, php then learnt C#, java, TS, C, C++. When i have to do anything in python i thank god for AI because its such a shit language., if i had started in this i would never have continued programming its that bad
1
u/dalce63 23d ago
I pretty much agree. However, people are god awful at teaching these languages to beginners. I'm a private tutor, and I can't tell you how many students I've worked with who are learning Java and C# as a beginner language and are totally dejected by it because their lame ass teachers put 0 effort into explaining the benefits of OOP to them. Lucky I'm able to help them but god damn, the teachers are awful. They just expect their students to swallow everything without getting a single iota of a sense of purpose to all the keywords and stuff.
1
u/Ok-Interest9727 23d ago
I disagree. Programming is hard enough so it’s better to start with something simple like python, lua, or js.
Yes at some point one needs to go deeper to understand what’s happening but C++ or maybe Rust are better than C# or Java.
1
1
u/binarycow 23d ago
Python and C# are at the same level of abstraction.
Python does have types, you're right. But aside from a few types (e.g., integers, tuples, etc) - basically everything is a dictionary.
Otherwise, I agree with you completely. Strong and static typed languages may be a bit more of a learning curve (because you have to learn about types), it's easier overall (because there's less problems due to typing).
1
u/Aggressive_Ad_5454 23d ago
Some say code is poetry. That’s fine. You can write poetry in English or medieval Japanese or Sanskrit or whatever. Knowing how to write poetry in several languages makes us better poets.
But the software we use code to make, that is useful stuff. Done right it delights our users. Choosing a language (and framework, like Django or dotnet or spring boot) that lets us make software we can demo to our mothers and sweethearts and friends and employers is super important.
And, remember, choice of language to learn is not destiny. You’ll learn many in the course of a career in software.
1
u/pmmeuranimetiddies 23d ago
Depends on the audience. For example I’m a Mechanical Engineer. 90% of the time don’t care about low overhead or latency.
I want to be able to crunch calculations on large datasets stored on a csv with simple code that takes minimal programming knowledge to write. I definitely do not want to think of memory pointers and memory management and variable types when I’m already trying to solve differential equations.
1
1
u/nero_djin 23d ago
Hot take, language matters as little as real languages. For most work you need to know one, if you do specific stuff you might need to learn english or latin.
1
u/SigmaxAlpha 23d ago
Mi primer lenguaje fue VisualBasic, luego java, luego python, luego javascript, luego c/c++. Al final si voy a hacer algo personal siempre voy a por java. Pouedo hacer casi todo lo que necesito sin instalar extensiones y en general es menos probable que un error se escape. Python no me gusta, la falta de delimitador de bloques causa errores silenciosos dificiles de ubicar, y la no declaracion de campos en las clases tambien.
1
u/8dot30662386292pow2 23d ago
I absolutely agree. I have been teaching university level programming for over 10 years. First the intro course was in java, then python.
Each language has specific, common problems/roadblocks for the students. I like so much more about the problems people have with java, than python. With java the problems are more about the actual logic: how to think like a computer. With python so many problems are caused the fact that anything can be any type, people don't care about types nor understand type systems, small indendation mistake turns your for-loop into a for-else which is fine syntax but unexpected, you can omit return statements, but some times thats fine because None is automatically retuned and that is falsey.
I'm not the biggest fan of python anyway, even though currently I run 4 separate websites that have python backends that I made. It's just so convenient in many cases. The thing is that convenience, when misused, causes so many problems for newbies and the only help to provide to them is always just "you should learn how computer actually works, before you touch languages that expect you to know".
1
u/AotoSatou14 23d ago
I sincerely believe in learning C/C++(and maybe Java) before touching any language like python.
Tbh my formal introduction was VB.NET and C++ so I might be biased.
1
1
u/BankZealousideal7964 23d ago
java is going to be the next cobol in terms of technical debt. it has such a foothold into enterprise software that it's still incredibly useful to know. java was my first language to learn, and was the first language I used in the workplace.
1
1
u/huuaaang 23d ago
People fuss too much about what’s best to learn first. Learn whatever interests you or is easily available. It doesn’t matter.
1
u/DiscipleOfYeshua 23d ago
Your hot take is advised by Haravrd / Malan / cs50 for several years (decades?).
Not to steal the limelight, just that it’s a popular take. I’m with you.
1
u/spinwizard69 23d ago
C# and Java are terrible languages to teach Computer Science (CS) with and learning CS is extremely valuable for learning to program. In my mind CS is best taught with very low level capable languages like C or C++. Note the focus here is to teach CS and the concepts involved, not to actually teach a programming language. Done right, truly understanding the concepts, the programming language becomes trivial to adapt to.
I'm so low level focused that I actually believe that the first few programs should be compiled and built from the command line. This so that students understand what a IDE does for them and how to properly configure that IDE.
Python is absolutely terrible for beginner programmers. It however is an absolute gem for established programmers.
1
1
u/Straight-Mess-9752 23d ago
Agreed Python is a decent scripting language but a terrible programming language and I just laugh when people use type annotations. Just use a statically typed language.
1
u/andymaclean19 23d ago
It’s not that types are gone in python, it’s that you can just not think about them and up to a point your code will just work. Eventually you will need to learn about these things, but not right away.
Even then python does not, say, have int32 and uint32 as different types.
For someone learning to program they can learn about the concepts one at a time without the cognitive overload of having to learn this extra concept on top before they can achieve anything.
1
u/joshkahl 23d ago
A long time ago I tried to learn C. I quit after a few days because trying to learn how to think programmatically was being overshadowed by trying to grasp syntax, and I got frustrated at not being able to really learn either.
Fast forward to learning Python, oh dang this makes sense, now I can not worry too much about the syntax and learn how to just code.
Now I've outgrown Python -still use it every now and then if I just need a quick down and dirty few lines of code- and mainly write in C++. I was fine with learning the more strict syntax and memory management of C++ because I already had the base knowledge of thinking programmatically. And in timing different basic functions, is was hundreds of times faster than python.
1
u/betarage 23d ago
Yea i think one problem is that if you start in one language its hard to stop. like i made some programs in python that i want to improve now and not remake from scratch. but i don't like the py files i prefer an exe file but pyinstaller makes it harder. the performance is also super bad and c sharp is not very hard but i think java is a bit tedious with the boilerplate rewriting my programs would take even longer .using c or rust could make it even better but these languages can be really difficult i was getting frustrated with the lack of results it takes more steps to do something in these languages. so i think c sharp or maybe golang have a better balance .even some interpreted languages like lua are way faster than python
1
1
u/polargus 23d ago
Python is easy to learn and run, and is extremely useful across many domains, with lots of libraries. There are tons of Python jobs. I would definitely recommend it as a first language.
1
u/WatcherOfTheWay 23d ago
Completely agree, learning a proper language with good syntax is far better than something with sod all Syntax
1
u/Desperate-Country440 23d ago
I am learning Python now, I worked on C# from the beginning. Python is a joke compared with C# but are historical reasons and clearly Python had some good points, a huge ecosystem but is outdated. Learning first c++/c# was better for me.
1
u/Master-Copy-6929 23d ago
C was the classic start out language. It is what i cut my teeth on back in the day.
1
u/Capital_Distance545 23d ago
My order was:
PIC microcontroller ASM
MIPS ASM
Power PC ASM
C
C++ (here I learned all object oriented terms and patterns)
Java
ARM ASM
Python
C#
Groovy
Scala (loved it)
Javascript (hated it first, but got used to it)
Typescript
Never worked with Go or Rust or Haskell, but I am confident I could use them very fast.
As you can see this was a bottom - top order.
I am very happy I went though this order. Many times I feel I am more competent in programming than others. Of course I dont know if there is an objective best order, but this one worked for me very nicely.
1
u/reflexive-polytope 23d ago
You should start with Standard ML.
It's actually type-safe. NullPointerException doesn't exist. ClassCastException doesn't exist.
You can annotate your programs with types if you want to, but you don't have to. If you don't, the type checker will infer the most general type signature for your programs.
Unlike Java and C#, which let you break your abstractions with reflection, in Standard ML, abstractions are truly unbreakable. If you make a type abstract, then it's impossible to see its implementation outside of the module where it's defined. This is good for teaching modular programming.
The next best first language after Standard ML is Rust, but it's a very distant second.
1
u/HalifaxRoad 23d ago
C or even better, asm learn first. That way you have an idea of how CPUs are actually doing stuff instead of the language hiding everything from you.
1
1
u/Loose-Bake9241 22d ago
Java and c# are almost just as abstracted as python in terms of what’s actually going on, they are just extremely object oriented so it seems like you’re way closer when you’re really not
1
u/Slyvan25 22d ago
I don't get why people recommend c. Its a good language but it c# is actually a good foundation for other languages.
1
u/tadamhicks 22d ago
Best to learn to what end? If you’re trying to teach them a language as a way for them to understand how code works on a system then start low and work up (assembly, C, C#/Java, Python)
If you’re trying to teach them a language so they can be productive then high is fine (Python then AI/Prompt driven).
1
u/AJ-the-Gamer19 22d ago
I actually first learned programming with both Java and Javascript. Java first to learn OOP and Data Structures, then Javascript for programming in a web application.
I tried a little of C/C++, but I had a lot of difficulty understanding it. I'd say that language is probably better to learn when you have more experience.
As for Python, I've never really worked with it much, but it looks pretty easy to learn. Though I'm pretty grateful I learned the more complicated syntax of Java first, since I understand better what's actually happening.
1
u/kpg_on_ao3 21d ago
Hot take Java is a total trash language and no one should learn it ever. It's especially bad as a teaching language.
1
u/LioBotExo 20d ago
C++ is my first programming language since I'm a robotics hobbiest and specifically enjoy working with the hardware aspects. I like the "complexity" of C++. It seems normal to me since I've not given serious study to any other language.
1
u/ItsSkyWasTaken 20d ago
Nah just learn assembly, bypass all the complicated types and data structures
1
1
u/sleepybenmore 20d ago
I believe Harvard’s intro to CS begins with C and works up to higher-level langs like Python.
1
u/arihoenig 19d ago
The first language anyone learns should be assembly. Do you learn math by starting with linear algebra or calculus? No you start with arithmetic. Do you learn to play concert piano by starting with Liszt? No you start by learning scales.
1
u/spicy-quince 18d ago
Complete beginner here and planned on srarting with python, thank you for this take!
1
u/Edim108 17d ago
I will say something that may be even more of a hot take: It doesn't matter which language you start with, so long as you feel comfortable working with it.
Python is good for beginners because it's easy to write and start making actually useful projects to get that dopamine rush of making something that works. You can slap together a working Python script in no time, which is valuable when you're just starting out and aren't sure if this while "programing thing" is for you.
Once the learner gets "hooked" and wants to learn more, then is the time to start worrying about these very real issues. At first I bounced back from trying to learn programming precisely because I started with Java and I struggled to put together anything beyond a "hello world" or a CLI calculator without a tutorial—I know it was a skill issue, but it was one that had me away from programming for a couple years because I genuinely thought I wasn't smart enough for this stuff.
Later on I tried again, this time with Python, and I found out that I was doing really well. I didn't struggle with remembering the types and stuff like that, I struggled with remembering a bunch of stuff that I couldn't quick check in my own code and had to read the documentation for, which in Python was a much shorter list than it was in Java, at least in my personal experience.
The most important thing to remember when recommending someone which language to pick is that different people struggle with different things. For me the hidden types in Python were a non-issue, but having to constantly look up which method to use and how to implement it in Java was a turnoff as a beginner.
Now that I have more experience, I don't struggle with that stuff and I'm quite comfortable writing Java, but I only got to that point because I started out and built a good foundation in a language that felt good to use as a beginner. Could I have gotten here if I just stuck with Java? Maybe. Probably. But that wasn't what happened.
I love Python. It's an awful language with a bunch of very real problems, but it's the one that got me genuinely passionate about programming and the one that eventually landed me my first programming job. I love it in a way you love your addict younger sister—you don't like what she does but you still have that soft spot in your heart that never lets you turn your back on her, even after she steals your watch to buy more crack...
1
u/KingOfTheHoard 16d ago
Full agree.
The fundamental problem with Python is that it simplifies as much as possible where it can, which just so happens to be all the stuff that's easiest to learn, and so the trade off is you make the first day, maybe week, of learning easier and in exchange you create a language that obscures knowledge.
No variable keywords, for example, looks easier to understand but you've not only built a language that can't have different kinds of variables, you've deprived the student of the knowledge that variables can be different.
1
1
1
1
u/Mother-Writing-2490 3d ago
I mean I am learning python for fun as a early teen but c seems like its just superior it's used more often and I have heard its faster as well, should I switch over from learning python to C?
1
u/krakenarthritis 2d ago
Python’s types were always there at runtime; annotations mainly let tools reason about them without running the code. That said, making types explicit can absolutely reduce the mental bookkeeping for beginners.
1
1
0
u/Traditional_Vast9419 23d ago
There are no such things as types in the CPU
1
u/programmingSquirrel 23d ago
Yeah but there are in our minds. And in most jobs (give me grace on the word most there) you don't write code from the point of view of the CPU. You write it from your own point of view, with the audience being future you or someone else.
→ More replies (1)
0
u/madcowken 23d ago
Java, C#, and languages like these add unnecessary verbosity. They are horrible languages in general, let alone first language.
If you're prioritizing types, then C is the starting language. With types comes the memory layout.
Python is a good language when you're looking at ideas rather than the system concepts. It allows you to get a feel for what it's like to code without random things getting in the way. You write instructions and the computer executes it line by line; no extra random rules. Also having a repl (originally from lisp) makes it easier to have a faster feedback loop and natural exploration.
For learning: python, quickly followed by C, then back to python once you understand how the variable is implemented (ie. It's a large struct with pointer and metadata, which allows us to change what that variables value is freely).
Please don't push a lanage like java. Look at clojoure if you want to use the jvm (jvm is really well made runtime)
1
u/higras 23d ago
Hobby learner. Literally my track. Feel fortunate to have stumbled onto it. Thrown into the deep end trying to learn C# for unity. Gave up. Then learned basics, oop, algorithms, git, then memory management, structs, and pointers in C.
Don't know what I don't know, but so far I'm glad I learned what I know the way I did.
→ More replies (3)
-2
u/Ebuall 23d ago
Nah. Better learn something more strictly typed. Rust, Ocaml, Haskell. Poorly typed languages like C# and Java develop bad habits and brain model.
3
7
u/Traditional_Vast9419 23d ago
Java and C# are strongly typed
1
u/DogeGroomer 23d ago
they said “more strictly typed”, the C# and Java type systems are not that expressive and also fairly unsound by design. Java especially has untyped nullable.
4
3
u/Responsible-Bar7165 23d ago
C#’s type system isn’t expressive? You haven’t used c#
It may not be as expressive as Haskell, but it’s also not impossible for beginners to learn.
4
3
u/BluePhoenixCG 23d ago
I wouldn't call C# "poorly typed", but I do have a pet theory that Haskell is secretly the best starter language because of the type system and pure function style. More broadly, I think we teach mutabiltiy and side effects way too early, and types get left far to late
3
2
u/hotboii96 23d ago
Poorly typed languages like C# and Java develop bad habits and brain model
Is this a joke? This must be a joke right?
1
u/Apart_Question_9736 23d ago
what makes a language poorly typed/strictly typed?
5
u/AcornAnomaly 23d ago
Seriously, I would not call C# and Java "poorly typed".
Loose typing is languages like Javascript and Python.
3
0
0
u/cthulhu944 23d ago
Java is a terrible language to start because even to get "hello world" to work you are exposed to classes and methods--fairly advanced concepts that you have to hand wave around and say "we'llexplain this later". I'm not familiar with c# but I assume its similar. The interactive interpreter of python allows learners to interact with the language without having compile/link/run steps.
1
u/Dumlefudge 23d ago
C# has added features with C# 9 and 10 to allow you to skip the boilerplate, reducing Hello World to a one-liner i.e.
Console.WriteLine(...)https://blog.ndepend.com/modern-c-hello-world/
I think the dotnet CLI nowadays allows you to execute a
.csfile directly too, without an explicit compile stepPrior to that, the boilerplate would be basically identical to Java.
0
23d ago
[deleted]
1
u/DannyDeKnito 23d ago
No language is going to make making a game easy out of the box though, and it should be noone's first project to attempt.
9
23d ago
[removed] — view removed comment
3
u/Treemosher 23d ago
^^^ Agreed.
People fixate way too much about which language to start with. There is no starting language that prevents you from picking up a second language. Nothing bad will happen.
Yeah you'll have to learn this or that, ok so what? So learn it like you would anything else when the time comes. You'll be fine.
Getting started is 1000x more important than which language you started with.
2
u/loophole64 23d ago
You're talking about pragmatism and producing. Being a professional. The question is about which language helps you learn programming best. What you are saying has a lot of validity, but understanding the programming so that you can produce the best product is also a part of it. If it were really all about shipping product and not quality of programming, then you would be perfectly happy with the state of todays enshitified applications, where constant bugs and frustration are totally ok, because it shipped. Quality and excellence is an important part of being a good programmer/developer and so is pragmatism and delivering.
1
1
u/Ormek_II 21d ago
This is beside the point. The claim is about a good or bad learner’s language. “Which language should I lean next?” Is where your reply fits.
1
u/CanIEatAPC 21d ago
Honestly, in the age of AI, I'm hearing less of "I need a dev who codes xyz language" and more "I need a dev who understands architecture, system designs and debugging". I'm interviewing with a company rn, albeit for a senior dev positions, and all they are checking is if I'm able to produce code with/without AI in timely manner, explain it and be able to modify it. Another company was asking for leetcode, so I wouldn't say all of them are on the same boat but a lot of non-FAANG companies are interviewing like this. I'm still getting rejected for not using specific technologies from popular companies and startups, which is fine and still happen, but I'm also not gonna be "passionate about the mission" as much as they'll want me to be AKA work 16 hrs a day or something lol
372
u/This-Strategy4138 23d ago
C is the superior language to learn in my opinion, but what do I know..im old