Thread closed
Last edited:
im not trying to trash your thread but just want to know how golang is faster. not in any context, just flat, how is goland better for coding bots than node.js (discord.js lets assume is the package)
id rather you not to provide any links to external sites like "Node.js vs Golang speed comparison". I just want to know how goland is faster and any evidence of it. and reason im not picking up much if not anything from the previous replies is because i cant be asked to read.
pretend i am a person just getting into discord bot development as well
so in short, why and what makes making bots in golang faster than making bots in node.js?
Edit: point of this is, to tell anyone, like a potential customer, why choose you (a person who uses golang for bots)
Its pronounced Golang, Goland is an IDE for golang which is unrelated to the language.
Node.JS
- Dynamically Typed
- Ran in a VM
- Prone to errors since type checking is done when the code is run not checked before hand so a bot could be working fine but if you input something wrong it breaks (More experienced developers aren't effected by this)
- Easy for noobs to learn
- Speed is ok
- Requires the user to have Node.JS installed to run the bot / install dependencies
- Requires the user to download prerequisites (Like discord.js) to run
Golang
- Statically Typed
- Ran on the bare system
- Type based errors are a rarity due to types being checked during compilation.
- A more harsh learning curve (more for advanced users)
- Speed is excellent
- No prerequisites for the customer (Compiles directly to an EXE or a similar binary for Linux / Mac)
As far as discord.js vs a golang alternative library its not really relevant to the customer which library the program uses unless they are a developer themselves.
In which case it just depends how much effort you want to put into a bot, Node.JS & Discord.JS = easy. Golang + discordgo or any other library != easy
Most people worth their salt will transition to typescript to allow for static typing in their Node javascript applications. If you design them well, the io will work extremely fast and optimally, not to mention Discord.js is the most supported and backed library of any of the languages for discord bot development. You say that library doesn't matter for the customer, but it does, because if there's any issue with a program's code, it is easier to find a Node developer than a go one. I also don't like the idea of comparing the two on speed alone, because that doesn't show the full picture of the context and it is quite irresponsible to claim such notions. Unless there are practical examples of run time performance for bot applications in both Golang and Node, you cannot make a definitive claim like that.
The speed can be synthetically compared in a minority of tests compared to the majority of real world applications. There are other factors to consider with performance aside from the raw capabilities of a language, such as if there is a database, are you polling it asynchronously or synchronously, are you using lambdas that are easier to use but slower than regular looping, sorting, and filtering functions, and a whole litany of factors.Golang is faster than Node.JS its been proven in many articles across the web, your opinion on the matter is irrelevant to the speed of a language. This has already been said in the other posts on this thread.
I don't know go but I hear its a good language. This thread turned into a shitshow, OP maybe make a new threadSorry that your thread is being trashed, I've been learning Go myself and I can 100% agree it's a really good language in nearly every aspect. Huge good luck with sales and I can't wait to see what you do in the future with Go.![]()
Shit show indeed, but after a few weeks even though it isn't long comparing it to other programming languages and working with a team behind some great Go products, I can 100% say it's an amazing programming language to learn.I don't know go but I hear its a good language. This thread turned into a shitshow, OP maybe make a new thread
