7 ms·
Ask HN: Go(lang) Is the New Basic?
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?
- jjgreen 3y agoGo doesn't have PEEK/POKE
- johnthescott 3y agocheckout type Pointer in golang package "unsafe".
- jjgreen 3y agoI 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.
- Pesthuf 3y agoThat’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.
- mikewarot 3y agoPython 2.7 was the new basic, but they made too many breaking changes, and keep making more. 8(
- martinbaun 3y agoI was actually a Python lover for a long time, but so many changes have made me look otherplace.
- hnthrowaway0328 3y agoThat 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?
- speps 3y agoUse 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.
- hnthrowaway0328 3y agoThanks, I'm thinking about something code based but you are probably right!
- dysoco 3y agoI'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.
- martinbaun 3y agoI 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.
- deleted 3y ago[deleted]
- thebuilderjr 3y ago[flagged]
- bicx 3y agoIn 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.
- pants2 3y agoIn 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.
- martinbaun 3y agoomg, it get's better (or worse) here :D
- martinbaun 3y agowow this is next level haha :D
- 3y ago
- erik_seaberg 3y agoI 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.
- marginalia_nu 3y agoFeels 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.
- martinbaun 3y agoyes exactly the same. Quite often I see the most beautiful solution with the simplest tools and solutions.
- erik_seaberg 3y agoI 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.
- pants2 3y agoOr 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.
- wruza 3y agoThe 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.
- chinabot 3y agoWhen you can fit it in an 8K ROM I will believe you
- pants2 3y agoTinyGo can do that no problem.
- martinbaun 3y agoExactly, no I can't get any of the libraries I want to work on TinyGo though, but that's another thing :)
- dev_0 3y ago[dead]
- ksherlock 3y agoThe 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.
- martinbaun 3y agoJavaScript always stare back even when you close your laptop
- ttymck 3y agoNice I want to die
- wruza 3y agoYes, 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?
- daviddever23box 3y agoWas the old BASIC terribly useful? Not really.
- martinbaun 3y agoBut 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.
- gregors 3y agoGo is the new Java, JavaScript is the new Basic, Rust is the new C
- martinbaun 3y agoI'd say Zig is the new C :) Why you think Go is the new Java?
- jeanlucas 3y agoI'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.
- mattfrommars 3y agoTangent 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?
- martinbaun 3y agoHey 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
- ikari_pl 3y agoI 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-of-keys-from-a-map https://stackoverflow.com/questions/21362950/getting-a-slice...
- mattfrommars 3y agoThank 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/ 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?
- 0H26 3y agoNo.