News for hackers. Stuff that matters.
Re:Show HN: My notes on Working with Go by colesantiago on Monday August 24, 2020 @05:20AM (#24258828)
what language do you suggest instead of go?
Re:Show HN: My notes on Working with Go by bruhlollol on Monday August 24, 2020 @05:23AM (#24258845)
Rust is a better choice
Re:Show HN: My notes on Working with Go by isatty on Monday August 24, 2020 @05:48AM (#24259007)
It depends on _for what_. The most important part of these discussions often leaves out this important part.

I use go as a python replacement for the most part and it’s brilliant at it. Types, compiled, good collection of external libraries and easy to read. For most of my scripting or mini projects I’m not willing to use C++ and by the same thought, I’m not willing to use rust either.

Re:Show HN: My notes on Working with Go by vips7L on Monday August 24, 2020 @06:35AM (#24259278)
While I am no fan of Go, Rust is not a better alternative for most use cases of the average Go program. A better alternative would more likely be Java/Kotlin/Scala/C#. All with proper generics, good standard libraries/ecosystems, and fast run times.
Re:Show HN: My notes on Working with Go by LandR on Monday August 24, 2020 @07:23AM (#24259576)
What if you need to compile to native? Some places don't accept having to have a VM like .NET or Java installed to run.
Re:Show HN: My notes on Working with Go by tfigment on Monday August 24, 2020 @09:24AM (#24260378)
.Net Core compiles to native and can be packaged to not need common runtime installed. And targets linux. You can even have it create a single file executable though admittedly it unpacks to temp folder at runtime if you do this. Down side is everything is like 80 MB minimum if you do this.
Re:Show HN: My notes on Working with Go by vips7L on Monday August 24, 2020 @01:06PM (#24262731)
.Net has CoreRT to compile to native and the JVM has Graal Native Image.

I've had success deploying native services using Quarkus [0] for Java.

Additionally in modern java you would use jlink [1] to produce a minimal jvm image that ships with your application. No need to install.

[0] https://quarkus.io/

[1] https://docs.oracle.com/en/java/javase/11/tools/jlink.html

Re:Show HN: My notes on Working with Go by jbreckmckye on Monday August 24, 2020 @07:52AM (#24259740)
Also GC is a real no-no for real-time.
Re:Show HN: My notes on Working with Go by nobleach on Monday August 24, 2020 @09:07AM (#24260229)
Go has a GC. Specifying the need for manual memory-management might be moving the goal-posts a bit.

Edit Phone auto-correct from memory management to measurement.

Re:Show HN: My notes on Working with Go by erik_seaberg on Tuesday August 25, 2020 @12:24AM (#24268115)
To be fair, it's possible to write code that does no heap allocation in each of these languages. None of them guard against mistakes that create GC work, and Java would not be my choice for this.
Re:Show HN: My notes on Working with Go by jbreckmckye on Wednesday August 26, 2020 @04:43AM (#24280462)
True. I've even had the "interesting" experience of writing low-allocation JavaScript (for 3D mostly).
Re:Show HN: My notes on Working with Go by colesantiago on Monday August 24, 2020 @05:27AM (#24258873)
Please expand more on why Rust "is a better choice"?

I'm still not convinced by this statement.

Re:Show HN: My notes on Working with Go by panta on Monday August 24, 2020 @05:46AM (#24258999)
For what? Usually absolutes are not very useful...