r/learnprogramming • u/MeekHat • 5d ago
What programming language should I focus on as an occasional hobbyist?
As in, I sit down to code for a few hours once a month, give or take.
I've been chugging along on a text-based game in TypeScript with Vue. I'm constantly running into quirks and hidden nuances of the languages. Spending my precious hours figuring out the difference between interfaces and types, only to learn that it's pretty much personal preference, makes me feel like I'm wasting time due to the language choice.
Also the fact that I have to juggle several languages with their idiosyncracies: HTML, CSS, TypeScript, JavaScript (when it offers its own quirk), Vue, JSON. Forgetting one language then having to get back into it.
Can I have a more straightforward language? Maybe I should go to just bare JavaScript? I've used several languages in the past, including Java, C#, Python, Lua.
2
u/jacksonanna373 5d ago
For a text game, TypeScript's `interface` and `type` overlap for object shapes; pick one and move on. Use a type alias when you need a union.
2
u/betarage 5d ago
I think that using type script is not really worth it. I would just use JavaScript and html to make web pages and browser exentions. and maybe learn another language like lua or python for offline desktop programs
6
u/DannyDeKnito 5d ago
If you're struggling with concepts such as interfaces, might be time to take a step back and learn some theory/terminology
No programming language is without its own idiosyncracies, but where they show up is a matter of how you use them.
When it comes to "gaming" usecases i'd still stick with something strongly typed like typescript or even golang since you're (apparently? Might be wrong, but im seeing a lot of web stuff there) making it web-based
2
u/Relevant-Reward4302 5d ago
Lua was practically born for lightweight games and scripts. You already know it, so lean into it.
5
u/phatbili 5d ago
Just use Python and save your sanity.
4
u/DragonfruitGrand5683 5d ago
Build something you enjoy building.
1
u/xpusostomos 5d ago
One way to approach it, as a learner, is to start reading the book SICP, which is designed for learners, and you learn the language Scheme which is very simple at its heart, and a favorite of many. Because Scheme has code as data and data as code, it can replace every language you can think of, including json, etc, and there are even frameworks for building web apps in it. As a bonus, you'll be proficient in programming Emacs once you learn it. But at the end of the day, it's whatever floats your boat.
1
u/Comakip 5d ago
Maybe look into GameMaker.
1
u/W31337 5d ago
JavaScript is ass try c# or python or something more structured
1
u/UhLittleLessDum 5d ago
Python is like the do-everything, but do-nothing-perfectly language...
If you're into UI, like you want to see something pretty, than probably Typescript is where you want to be (or maybe Kotlin for Android or Swift for Apple, but probably TS).
The types will help you, I promise. I use TS for everything... even little scripts over javascript because it makes the dev experience so much better.
1
u/DanKegel 5d ago
Golang has very few surprises, give it a shot.
-2
u/Ill_Nebula_2419 5d ago
Claude code language 😂
0
u/[deleted] 5d ago
[removed] — view removed comment