Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Go(lang) Is the New Basic?
19 points by martinbaun 11 months ago | hide | past | favorite | 43 comments
With "the new Basic" I mean the good parts.

Basic focused on the essential, no weird crazy language features that would take you 10 years to master - C++ I am looking at you.

Go focuses on the basics (pun intended); thus, you can focus more on getting stuff done than fancy abstractions and language features. Of course, Go has more features, but they seem to be baked in well and important.

What do you think of this observation?




The year is 1983. You turn on your computer. Bang. BASIC stares back at you. Now, 40 years later, you go to the development console in your browser. Bang. Javascript stares back at you.


Yes, but can it CIRCLE? Or you’re confident enough to teach a 10yo about adding layout div with an svg content to innerHTML to draw it and then querySelector() to handle its position? How will you INKEY, by putting some event handlers in the body? Good luck watching that kid trying to repeat that on his own later. Maybe a little project could help. To make life a little easier, we’ll get a hot-reload bundler and install vscode to edit a program. With a formatting linter of course, because there’s =, == and ===. But the main goal is not to just draw something, but to show off in school. So where does one choose a deployment target there in gitlab again?


JavaScript always stare back even when you close your laptop


Nice I want to die


I find a short learning curve to be like an empty toolbox. I want to keep mastering more powerful tools to be ready for harder problems.


Feels like a bit of a dubious assumption that hard problems need particular tools to be solved.

In my experience, it is just that, experience that makes or breaks a solution.


yes exactly the same. Quite often I see the most beautiful solution with the simplest tools and solutions.


I enjoy Scheme R5RS-style minimalism as a hobby, but if a team of ten works that way we end up with ten mutually incompatible mini-frameworks, which is a lot more to learn and test than a single good one.


Or look at it like a kitchen... Some people get every as-seen-on-TV gizmo to make caramelizing their coconuts easier, but professional chefs just need a good knife and a cast iron pan.


The problem with powerful tools is that they usually don’t fit between your bathtub sink and the wall. So you either just take the wrench anyway and do it the old boring way, or maniacally try to rearrange the walls to make it work, because sunken costs aren’t easy to let go.


Tangent question, what is a good strategy to transition into Go scope coming from a Java/C# ? There are plethora of tutorials online how to learn to code Go. But how to get hired onto a Go programming role since my day job focuses only on Java/C# stack only?


I know nobody likes to read or focus anymore but...

"Learning Go" from O'Reilly is a book I've started way too late - a year into a Golang project (I've been hiring into a Go programming role with the only thing I knew about go being "I can't understand the order of words in var/type declarations; oh, and it compiles to a single binary."). It's really good, explaining what's idiomatic in Golang and where I and my coworkers made really silly things.

Plus a side project to actually use it on. Practice is the only way many of us get to remember things.

I sometimes think that doing some computational challenges may be fun too, at least to learn how benchmarking and concurrency works in Go.

And if you're coming from these... don't expect too much "batteries included". If I read [0] correctly, it took 7 years of Golang on the market to get a built-in method to get all keys of a map.

[0]: https://stackoverflow.com/questions/21362950/getting-a-slice...


Thank you for your response. I will definitely add 'Learning Go' to my bookmark on O'Reilly. Coworker of mine started with official documentation of Go. I am curious if you know about this: https://quii.gitbook.io/learn-go-with-tests/

I have honestly never practiced true TDD and figured the above resource will get me to explore both, TDD and Go. And maybe transition into 'Learning Go' to learn more in depth about the language? What do you think?


Hey Matt,

Go is so easy to jump in compared to almost any other programming language. As you're already familiar with Java/C# I'd say just start some side projects. Might be beneficial to read a little about how the go packages work etc.. but beside that just start :)

go run main.go

and start adding things to main that you'd want. If you want more info about Go, just book a meeting with martinbaun.com/book Not looking to hire currently, but I'd gladly help in the right direction


Go doesn't have PEEK/POKE


checkout type Pointer in golang package "unsafe".


I wrote a "ball in a box" program in basic <mumble> years ago, the ball poked into a block of memory and bounced around and was drawn on the screen. I was very pleased with myself. Occasionally the ball would escape the box and proceed to travel through the address-space, eventually poking into the memory where the OS lived, locking the machine. I bet go can't do that, however "unsafe" it claims to be.


That’s not because of Go, that’s because of protected mode and virtual memory.

If run on a system that doesn’t have that, Go could absolutely read and write to system memory.


That said which one is closer to BASIC? I was planning to write a series of tutorials for kids around 10 years of old using Pygame Zero, but how do I explain the game programming concepts such as game loop and sprite rendering?


I've found Lua and Love2D to be a joy to learn and use.

Also maybe PICO-8 though I don't like that you have to buy it.


Use something like Construct, GameMaker, etc. immediate visual feedback is super important! That's why Unreal Engine is so popular even in professional game studios, the Editor is fantastic.


Thanks, I'm thinking about something code based but you are probably right!


I am not an educator especially not with kids, so I take everything I say with a big glass of salt water.

I'd explain the basic constructs of loop, functions and statements, and then ask them to think how they could make the game work (looping part) and render.


Go is the new Java, JavaScript is the new Basic, Rust is the new C


I'd say Zig is the new C :)

Why you think Go is the new Java?


I'd love if Zig became the new C, but I think Rust is closer to that title. It even is on the Linux kernel and growing there daily.


Python 2.7 was the new basic, but they made too many breaking changes, and keep making more. 8(


I was actually a Python lover for a long time, but so many changes have made me look otherplace.


When you can fit it in an 8K ROM I will believe you


TinyGo can do that no problem.


Exactly, no I can't get any of the libraries I want to work on TinyGo though, but that's another thing :)


No.


Was the old BASIC terribly useful? Not really.


But it got things done without too much BS, which is refreshing in todays world.

We run Python, inside Docker, Inside Kubernetes, inside a fake virtual machine, with libraries that use C extensions and an interpreter.

Basic just runs, same with Go. No need to have a lot of things up and running to get stuff done.


In contemplating the observation that Go may be considered the "new Basic," we find ourselves stirring a delightful medley of thoughts. Basic, once the harbinger of beginner-friendly programming, possessed a remarkable ability to focus on the essentials, eschewing the labyrinthine complexity of its contemporaries. Indeed, C++ cannot evade our gaze in this regard.

Go, it seems, is kindred in spirit, placing utmost emphasis on the fundamentals, yielding a pristine landscape for those craving productivity. Though Go possesses deeper strata of features, they exhibit an exceptional harmony, intimately woven into the fabric of the language.


I must interject with a gentle observation. Your eloquent reiteration of the original post's sentiments, while adorned with a delightful medley of flowery language, seems to mirror the very essence of an automated response. The harmonious blend of your words, while undeniably elegant, carries a whiff of the algorithmic - as if each phrase was carefully selected and woven together by an intricate tapestry of machine learning algorithms.

Might I inquire, dear interlocutor, whether you have employed the services of an AI language model to aid in the crafting of your response? For while it is not inherently problematic, it does add a fascinating layer to our discussion on the simplicity and transparency of programming languages.


Indeed I often times use a GPT4 template to make my relatively simple ideas sound more concise and insightful :)

https://www.llmtemplates.ai/templates/55d1f637-e3ac-4c12-8b0...


great observation :)


In perusing your articulate musings on the comparison of Go to the 'new Basic,' I find myself immersed in a rich tapestry of language and analogy. Your skill in drawing parallels between Basic's pioneering simplicity and Go's focus on essentialism is indeed commendable. Just as Basic once stood as a beacon for accessible programming, Go emerges as its modern counterpart, eschewing the complexities epitomized by languages such as C++.

However, upon deeper reflection, it becomes evident that this elegant exposition, while a pleasure to read, treads familiar ground. The insights offered, mirroring those of the original post, rephrase rather than expand upon the discussion. It's a beautifully crafted piece, yet it stops short of contributing novel perspectives to the initial dialogue.


In the effulgent firmament of your discursive exposition, juxtaposing the Go paradigm with the antediluvian 'new Basic' edifice, I find myself enveloped in an ethereal nebula of syntactic opulence and metaphorical grandiloquence. Your prowess in adumbrating the symphony of parallels between Basic's erstwhile apotheosis of Spartan codification and Go's present-day odyssey, eschewing the byzantine entanglements emblematic of syntactical leviathans such as C++, is nothing short of praiseworthy. Basic, in its halcyon days, illuminated the penumbral labyrinth of programming for the uninitiated, whereas Go now emerges as its pharos, abnegating the serpentine complexities that its forebears have ostentatiously cultivated.


omg, it get's better (or worse) here :D


wow this is next level haha :D


I love what you said here, this is exactly my feeling/experience when working in Go. I hate it because I can't use fancy abstractions like Python or JavaScript. BUT I love that everyone else can't use fancy abstractions haha :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: