r/learnprogramming • • 11h 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)?

21 Upvotes

33 comments sorted by

6

u/KingOfTheHoard 11h 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.

1

u/chiefwhitehalfcoat 11h 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 11h ago edited 9h 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.

2

u/chiefwhitehalfcoat 10h 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 5h 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 9h 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 5h ago edited 5h 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.

4

u/Different_Pain5781 7h ago

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

4

u/bird_feeder_bird 7h 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.

23

u/Extension_Star_5222 11h 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.

1

u/NeradaLyreco 6h ago

Ba-dum-tss!

Sorry had to do it.

6

u/LukaRozman27 8h 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.

4

u/bird_feeder_bird 11h 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 11h 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 11h 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 11h 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_ 11h ago

I recommend go.

3

u/StumpyTeamDev 10h ago

Pick Go for this one. You already have the Python-shaped path from GDScript, and the hole you described is a program that starts, does the work, and exits without an engine driving it. A small CLI in Go makes that hole the whole project, and the standard library docs are what you read while you build it.

1

u/Intelligent_Part101 6h 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.

2

u/faruzzy 6h ago

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

2

u/xeow 5h ago

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

1

u/betarage 10h 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/Mountain_Rip_8426 7h 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)

1

u/Gullible_Sweet1302 3h ago

Python learn in a week.

1

u/MrMonday11235 1h 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.

-1

u/duane11583 11h 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 11h ago

You just had to read the first sentence...

0

u/Dapper-Teaching-8074 11h 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 10h ago

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

0

u/gooniannuber1 9h ago

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

0

u/Wingedchestnut 6h 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.

-3

u/Early_Key_823 11h ago

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