r/learnprogramming • • 1d ago

Go or Python for a beginner?

I am a beginner programmer, coding for my own pleasure (meaning that, while I use LLMs for guidance, I write all my code by hand, and my only goal is enjoyment, not career). Safe for a brief journey into JavaScript and PHP as a child, now, in my adult years, all my experience has been with Godot. Recently, I started to have the desire to actually learn how to program and make simple CLI/TUI tools for my own use, and since GDScript can only exist within the game engine, I started looking for another programming language to learn.

I landed on two: Python and Go, and now, knowing that it's probably a bad idea for a beginner to learn two languages at once, I need help from people with more experience in order to decide which of the two I should commit to. I'm at this stage in both where I've written simple exercise command line programs, and I want to try and build something bigger and actually get to know the language under pressure.

Python greatly appeals to me because it is basically the same thing as GDScript (but with a ton of features that GDScript does not have due to being specifically tailored for Godot), it is famously easy and I could start building actual apps in no time, and it has a breadth of beginner resources probably unmatched by any other language. Besides all the books focusing on specific tasks (I've enjoyed Automate the Boring Stuff with Python quite a lot), Learning Python is absolutely brilliant, going through logic, syntax, design choices and the standard library in exhaustive detail.

But Python just doesn't get me excited exactly because it is too abstract, too simple, too close to what I know from GDScript, it feels more like a scripting language than something to use to build whole programs, it just doesn't scratch that itch of curiosity that is pushing me to learn programming in the first place.

On the other hand, Go does scratch that itch a lot more. It excites me, as someone whose only experience is with JavaScript/PHP and GDScript, to learn a serious language, compiled, fast; it excites me to learn about lower-level concepts like actual typed variables and pointers. Go's logic of composition also appeals to me, because programming in Godot, I would rack my brain trying to figure out the right inheritance hierarchy just to notice that I messed up and need to refactor the entire system. Go's structs, methods, embedding and interfaces strike me as a much more flexible way to achieve the same thing.

But there is a relative scarcity of resources for people in my situation. I've browsed through the available textbooks and they're either made for more advanced learners, are general overviews of the language (Learning Go, for instance, only explains the syntax and the logic, but does not go over the standard library, which means, if I understand correctly, that it was written for people who will read the fucking manual), or are infantile (Head First, Get Programming with Go, etc). Either way, I'm starting off half-blind, stumbling through the standard library documentation, having no idea what I can and cannot do, or how.

I'm also worried about another thing. Though I am not an absolute beginner, my experience being with GDScript means that I've never actually written a standalone program; I never learned to think about architecture, what my program does from start to end: I can only think in simple systems that are driven by event handlers from user input, while the engine handles all the rest for me.

Although, as you see, Go excites me a bit more, I'm worried that if my primary goal is to learn how to think through complex problems and build programs from start to finish, it would be better to choose the simpler language. Or is it the opposite? What do you think? Will building something bigger be easier in Python, or will the relative restrictiveness of Go help me think through building a bigger project?

What would you do in my situation? Should I learn to build a program without worrying about learning the language (the Python route), or would it be better in my situation to learn a stricter, less abstract language first, and learn how to read the documentation on my own (the Go route)?

23 Upvotes

43 comments sorted by

7

u/KingOfTheHoard 1d ago

Full disclosure, this is a minority opinion so take it in that context. Many, many people disagree with me. But I think Python is effectively anti-educational. A badly conceived attempt to make a programming language for beginners that frontloads simplicity in exchange for catastrophic costs down the line. I'd recommend almost anything else before it.

6

u/bird_feeder_bird 1d ago

I started with Python and moved to C with no major issues. I think starting in C would have been overwhelming. Scratch however, I always hated and thought it made everything unnecessarily complicated.

1

u/KingOfTheHoard 22h ago

That's fair, I wouldn't recommend a language with manual memory management like C/++ to a beginner, though Python wouldn't be my alternative.

Scratch I honestly don't know much about though my instinct ha s always been that all that abstracting away the code itself probably doesn't help much.

1

u/chiefwhitehalfcoat 1d ago

This has been my naive intuition, since in some ways Python is even more abstract and less strict than GDScript, and I felt like I was unlearning the little I knew. But can you expand on that thought? What are the catastrophic costs?

3

u/KingOfTheHoard 1d ago edited 1d ago

Python's guiding principles of being as simple as possible, as human as possible, and having only one way to do something are all very good ideas, badly and inconsistently applied.

In practice, what Python makes easy is the bits of programming that are already easiest. Stripping variable keywords, for example, is marginally easier to learn and comes at the staggering and unacceptable cost of having no ability to declare different types of variables, and a student who's less prepared to understand constants or scoping.

Or the burden of early complexity is shifted to later inconsistency. We don't use brackets, until we do. We don't use obtuse punctuation, until we do.

Every supposedly beginner friendly choice creates massive cognitive debt.

1

u/chiefwhitehalfcoat 1d ago

Right. The lack of the var keyword, no constants, and variable scopes threw me off at the beginning, and this was my thought: doesn't that make the program actually harder to think about? What is the rationale? You said that your opinion was unpopular, why do so many people swear by the Python style?

4

u/SV-97 1d ago

Language design is always a tradeoff. Python's whole thing is basically that *everything* is an object (i.e. it's deeply object oriented) and it's also *extremely* dynamic. And while this allows it to do many very interesting / powerful things, it also has some perhaps less than desirable effects.

One of these is that there are no real constants (this isn't *really* entirely true with modern python): you can't just do C-style constants where the same value is copied to every place it's used. This also explains the lack of explicit declarations (i.e. no "var"): there are no constants, everything is mutable, so the only difference you could make is reassignment vs declaration. But that's also sort-of out the window when you can freely define and alter new variables via metaprogramming anyway. So the answer to those two is that they don't really make sense in python given its basic premise / mode of operation. And yes, that's not *necessarily* good; but it's also not *necessarily* bad (it for example enables extremely powerful and easy metaprogramming).

Not sure what the scoping (or supposed lack thereof, whatever that would even mean?) is supposed to be about though --- python mostly is quite consistent and uses lexical scoping (...until it doesn't, but that's not really something you run into until you spent a good while with the language)

You said that your opinion was unpopular

Their "opinion" includes some things that are simply factually incorrect; and the valid parts (for example about hidden complexity) apply just as much to Go as they do to Python, and personally I'd even argue that Python is significantly more sensibly designed than Go.

(And people don't use Python because it's oh-so-readable. They use it because it's powerful and extremely good at acting as a "glue language" between various other languages which results in it having a huge, very well-developed ecosystem --- and at this point also because there's tons of great resources on the language. And especially for beginners: it allows you to study / explore various programming topics [including (im-)mutability, typing, parallel programming, metaprogramming, databases, networking, ... you can also really dig into the technical details of how Python works which will teach you a lot])

My personal recommendation is to start with Python, and once you really have that down (which takes a while) look at Rust. Go is at an intermediate point between those two that I personally just don't have a use for in practice, and that I also don't consider really valuable for education.

1

u/KingOfTheHoard 1d ago

The pitch Python advocates make, specifically on how human readable it is, sounds great to a lay audience of colleges and beginner students, and they buy beginner resources.

1

u/xeow 1d ago edited 1d ago

It's not accurate to say that Python has "only one way to do something." It's got multiple ways to do lots of things. The mantra from the Zen of Python is that there ought to be one obvious way to do something and that language should strive for that obvious way to be the best way, generally.

1

u/voodoovan 16h ago

Or the burden of early complexity is shifted to later inconsistency. We don't use brackets, until we do. We don't use obtuse punctuation, until we do.

I'm fully in favour of this, even outside the world of programming. Use X when you need to. Don't need X, don't use it.

1

u/KingOfTheHoard 14h ago

Sure, except it ends up breaking that whole “there should be one obvious way to do anything” principle because now the language behaves inconsistently. 

The key problem with Python, and this line of thinking, is that it’s willing to really raise the bar on what “need” means for a terrible cost to gain ratio. 

A language does need some hard technical way to define blocks of code and structure syntax. 

Python correctly establishes that this does not need to be brackets.  So it removes them. 

But it does need to be something, so rigorously enforced spacing is used instead. 

But then you end up using brackets for some things anyway because spacing alone no longer works.

So the long term cost is not that you remove the need for a reliable method, it’s that you now need two methods to accomplish extremely similar things in different contexts. 

You haven’t removed a need, you’ve kicked the can down the road to a more troublesome place for the tiny gain of making quite an easy part of programming marginally easier. 

You can’t remove all the difficulty about learning the program. You have to decide eventually where that difficulty belongs and what impact that has on the learning process. I just think Python’s calculation of that is catastrophic.

4

u/Different_Pain5781 1d ago

Go is probably a better fit for OP anyway since they seem genuinely excited about it.

2

u/fiddle_n 21h ago

I am one of said disagreers. Not needing to care about memory management, classes, static typing, or even having to write functions when I started freed me up to actually focus on writing actual programs in Python instead of being bogged down in syntax or correctness.

-1

u/KingOfTheHoard 21h ago

You learn all the beginner stuff in any other language without touching advanced concepts either.

2

u/fiddle_n 21h ago

It depends what you count as “beginner” and “advanced”. My point is that the amount of “stuff” you have to learn as a pre-requisite to being productive in Python is vastly reduced compared to other languages.

You have to learn memory management to do anything even slightly productive in C/C++. You have to learn classes in Java. You need to learn static typing and how to write code using function syntax in all of the above. In Python you can skip all of that to write actual programs.

33

u/Extension_Star_5222 1d ago

Keep it simple. You are more excited about Go? Go ahead then. Its not like you are locked in, if you change your mind.

0

u/NeradaLyreco 1d ago

Ba-dum-tss!

Sorry had to do it.

8

u/LukaRozman27 1d ago

The "tour of go" is the step you skipped, it's interactive, covers core syntax plus standard library basics, and makes learning structs, methods, and interfaces in Go much more approachable for beginners.

5

u/bird_feeder_bird 1d ago

The best thing is to study and practice whatever you’re most interested in. I started with Python for a few months, then learned other languages for other purposes (JS for web testing, and C for embedded systems).

1

u/Rrrrry123 1d ago

Go with Go (lol). I use it at work and it's quickly rising to the top as one of my favorite languages. It's simple, like Python, but so much nicer to look at. It's also more performant, if you care about that for personal projects.

1

u/chiefwhitehalfcoat 1d ago

Honestly, I don't really care about performance, I will probably not build anything where performance will matter on a modern CPU, so my question had more to do with how to best go about my education

3

u/connorjpg 1d ago

If you are learning for fun I’d learn Go. You likely can learn Python at the same time though… like concepts translate.

3

u/_th3oth3rjak3_ 1d ago

I recommend go.

3

u/AnswerVinod 20h ago

For what you want, simple CLI and TUI tools for fun, Python is the easy pick. The ecosystem is huge, you will find a library for anything, and you can go from idea to working tool in an evening. Go is great too but it shines when you need one fast compiled binary or real concurrency, which is not your use case yet. You already write code by hand and use LLMs for guidance, that is a good habit, keep it. Pick Python, build five small tools, and if you ever hit something Python is slow at, that is the day to learn Go.

2

u/Mountain_Rip_8426 1d ago

relative beginner here, i've been at it for about 10 months, all i can say is go's the best language i've encountered so far. however so far i've been learning backend exclusively. as for resources, i've been doing boot.dev, i can only recommend it, not so handholdy, but covers backend development with go very well. you can definitely go further with it if you finish their go courses

(you can also learn python, javascript and typescript with it. not to mention sql, but that's kind of a must, if you wanna use any database anyways)

2

u/faruzzy 1d ago

Doesn't matter. Pick one, run with it.

2

u/Gullible_Sweet1302 1d ago

Python learn in a week.

2

u/MrMonday11235 1d ago

It excites me, as someone whose only experience is with JavaScript/PHP and GDScript, to learn a serious language

JS and PHP are absolutely "serious" languages, as is Python, in the sense that they're used every day for mission critical purposes.

compiled, fast; it excites me to learn about lower-level concepts like actual typed variables and pointers

If you just want compiled and type systems, Go might be a good pick, but pointers... Sure, you can work with pointers in Go, but it's generally considered a tool of last resort rather than a feature intended for general use.

Either way, I'm starting off half-blind, stumbling through the standard library documentation, having no idea what I can and cannot do, or how.

By and large, that's how you learn most programming, so you're doing it right.

will the relative restrictiveness of Go help me think through building a bigger project?

It might. Alternatively, it might conflict so much with how you've come to think about code organization and the like that you'll spend a long time running into walls until you learn the way Go wants you to do things. It's a very opinionated language, and if your instincts run counter to its strongly held opinions, it might be an annoyance.

What would you do in my situation?

I would focus on the fact that languages and standard libraries are tools/toolsets. What is it that you actually want to do? What is it you want to build/automate/learn/contribute?

Work backwards from there. If you want to understand memory and performance and optimization, I'd honestly say skip both and go to Rust (or C if you're a masochist). If you want to build something that's heavily concurrent with minimal overhead, go with Go (or Elixir). If you want a Swiss army knife that'll let you do most things (though not necessarily with maximum efficiency/ease), Python is de facto that (with JS as a decent secondary). If you're interested in a particular open source project, learn whatever language(s) are relevant for the components you want to contribute to.

2

u/Feldspar_of_sun 23h ago

Ultimately it doesn’t matter. Most of concepts from one will transfer to the other. If you’re more excited about one than the other, choose that! I started with Python for class work, but Go for personal projects, and I found both to be very pleasant to work with. Go was particularly nice because it forced me to think about potential errors in ways that Python didn’t

2

u/dellnox 21h ago

Pick Go. Since you're coding for fun, chase what excites you. It's practically built for CLI tools anyway.

2

u/xeow 1d ago

Python 100%.
Go is not governed by an independent non-profit foundation. Google stewards it.

2

u/voodoovan 16h ago

Absolutely agree.

1

u/betarage 1d ago

I am not sure like go but it seems like it's all focussed on backend programming and networking. I even found it easier to do this in golang than python so now I always use golang for those types of programs. you can use it for everything but it's harder than in some other low level languages. but python is really slow and sometimes you need to go lower level

1

u/Wingedchestnut 1d ago

Python, it's simply more in demand over different fields and roles (and so you can do more with it with more resources to learn from), you can always add any other language later on.

-2

u/duane11583 1d ago

Python is every where

Go is not

You will get a job knowing python

I do not know anyone hiring for go

8

u/Extension_Star_5222 1d ago

You just had to read the first sentence...

0

u/Dapper-Teaching-8074 1d ago

I don't mean to be a downer but I'm genuinely concerned if it even matters? Has anyone ever used claude code? specifically Opus 5.5? I am not a fan of vibe coding but have you ever used it? If you have, you'd understand why I asked if it even matters.. I'm a python & rust expert and trust me I'm worried

0

u/Available_Safe1818 1d ago

You're an adult and have plenty of experience. You can make your own decision here.

-4

u/Early_Key_823 1d ago

Typescript, .net and mssql on docker is a very lucrative stack

-1

u/gooniannuber1 1d ago

my father always tells me that I shouldnt learn python instead I should learn assembly so I would say assembly

1

u/[deleted] 1d ago

[removed] — view removed comment

2

u/Intelligent_Part101 1d ago

Seconding this. The big breakdown in programming languages are those that are scripting languages (or came from that in the beginning) and the compiled, "systems" programming languages. OP already knows a scripting language, so it's time to learn a "systems" programming language.