Top
Best
New

Posted by database64128 17 hours ago

Go 1.27(go.dev)
661 points | 197 commentspage 2
ejboy 13 hours ago|
Used to code primarily in Java. Now my app stack is about 80% Go. I love that it enables lightweight application development. Glad to see the platform evolving with a focus on resource efficiency.
tschellenbach 16 hours ago||
Every release CPU load becomes a bit lower. Love it :)
ejboy 13 hours ago|
Keeping priorities right!
olexsmir 16 hours ago||
Full release notes: https://go.dev/doc/go1.27
sethops1 16 hours ago||
FYI golangci-lint and gopls are both broken if you try using generic methods.
tkw01536 4 hours ago||
I’ve been able to run golangci-lint locally just fine.

However I’ve not had much success running it on CI, with at least the 1.27rcs. I encountered some panic deep within staticcheck, and ended up turning off that specific linter on CI (better than not running it at all).

There was a tracking issue for go1.27 support at [1]. However that is now closed, which might imply that it should be working.

[1] https://github.com/golangci/golangci-lint/issues/6643

adonovan 12 hours ago|||
Broken how? Please report an issue. The latest gopls should support generic methods.
sethops1 12 hours ago||
Ah my bad gopls is fine; I forgot to run

    go install golang.org/x/tools/gopls@latest
after upgrading Go itself.
atsjie 16 hours ago||
Thank you for the headsup!
tschellenbach 16 hours ago||
New JSON is amazing, and SIMD will be big for json, audio/video etc.
todotask2 6 hours ago||
Interesting, this reduced memory usage in my test down from 14 MB to 12 MB, and Bun (Rust) is still at 7.2 MB, down from 10 MB with Bun (Zig).
nick_ 16 hours ago||
Nice additions to go.

I like to imagine that one day we'll have a language that launched with all the features languages eventually add. The whole ecosystem of packages would be built on them instead of a legacy of more primitive language feature sets.

fmbb 16 hours ago||
I don’t think launching Go today would have been better than 15 years ago.

Standard ML is a perfect programming language from the 90s. It unfortunately does not have a great eco system of packages.

qaq 15 hours ago||
I mean one thing frontier models are really good at is porting code with pretty low level of supervision. Provided there are enough fans porting packages from other ecosystems should not be a big challenge.
abtinf 12 hours ago||
Obligatory XKCD reference:

https://xkcd.com/927/

evantbyrne 10 hours ago||
Generic methods are a huge win for the language. I've been waiting on these kinds of improvements to the type system before resuming work on my database toolkit.
drivebyhooting 10 hours ago||
I know this is an extremely unwelcome comment but I just have to ask… have you considered rust? Especially for a DB.

I just had excellent success migrating a go code base to rust completely AI driven. It led to a healthy performance boost too, as now I don’t need to worry about GC pressure contortions.

AdieuToLogic 10 hours ago||
> Generic methods are a huge win for the language. I've been waiting on these kinds of improvements to the type system ...

It's funny that you and many others have found the introduction of "generics" in Go to be highly valuable, considering one of the motivations for Go's existence was:

  Its designers were primarily motivated by their shared dislike of C++[0]
One of the language features C++ provides, "templates", was explicitly rejected by the language authors as being antithetical to Go philosophy[1]. Thompson put it bluntly:

  DDJ: In the presentation before the awarding of the Japan 
  Prize today, you were quoted on the distinction between 
  reasearch and development. [The former, Thompson stated, 
  was directionless, whereas development had a specific goal 
  in mind.] So in that context, is Go experimental?
  
  KT: Yes. When the three of us [Thompson, Rob Pike, and 
  Robert Griesemer] got started, it was pure research. The 
  three of us got together and decided that we hated C++. 
  [laughter] [2]
And now, years later, generics are "a huge win."

0 - https://en.wikipedia.org/wiki/Go_(programming_language)#Hist...

1 - https://commandcenter.blogspot.com/2012/06/less-is-exponenti...

2 - https://web.archive.org/web/20110521080746/http://drdobbs.co...

win311fwg 9 hours ago||
Generics were always planned, of course: https://www.youtube.com/watch?v=rKnDgT73v8s&t=3267s

Rejecting templates does not mean rejecting generics.

AdieuToLogic 8 hours ago||
> Generics were always planned, of course ...

This is provably incorrect.

The position held for many years by the language authors was[0]:

  Generics may well be added at some point. We don't feel an 
  urgency for them, although we understand some programmers 
  do.
  
  Generics are convenient but they come at a cost in 
  complexity in the type system and run-time. We haven't yet 
  found a design that gives value proportionate to the 
  complexity, although we continue to think about it. 
  Meanwhile, Go's built-in maps and slices, plus the ability 
  to use the empty interface to construct containers (with 
  explicit unboxing) mean in many cases it is possible to 
  write code that does what generics would enable, if less 
  smoothly. 
Once the community could no longer be held back, the golang FAQ presented a very different position[1]:

  The Go 1.18 release added type parameters to the language. 
  This permits a form of polymorphic or generic programming.
0 - https://web.archive.org/web/20170102202940/http://golang.org...

1 - https://go.dev/doc/faq#generics

potamic 6 hours ago|||
> Generics are convenient but they come at a cost in complexity in the type system and run-time.

By run-time they mean compile-time? There shouldn't be a run-time penalty right?

Also, is there some measure of the additional compilation cost now that generics has been added?

neild 4 hours ago||
The “runtime” as in the compiler runtime which provides the scheduler, garbage collector, etc.
dolmen 1 hour ago||
The runtime also includes reflection, so preserving compatibility of the type system while adding generics was definitely a challenge, so adding generics to Go was definitely a great achievement.
win311fwg 8 hours ago|||
Considering that Ian was already working on them before 1.0, and never stopped until a solution was found, we know for certain they were planned by at least one person on the Go team. If you are struggling to say that Go people are not a single monolith then sure. Nobody has ever thought people are a single monolith.

However, the original announcement makes the intent of the project clear: "Not yet", not "never". They were always planned to be accepted into Go. But not before an acceptable solution was found.

ksec 3 hours ago||
Do we know if Go team is working in 2.0 release?
dolmen 1 hour ago||
We know they aren't.

They have successfully been able to add major features such as generics without breaking 1.0 compatibility, and the trend is to continue than way. Well there is no major language feature in sight in fact.

Also major figures of the Go team (Russ, Ian, Rob, Ken) are gone.

ksec 40 seconds ago||
Oh I somehow completely missed Russ left. I was rather hoping there will be a version 2 from all the lessons they have learned.
jeanbza 16 hours ago||
I have been waiting for generic methods and can't wait to use them!

The `go fix` modernisers are also great, have already run them in several repos.

Hasz 16 hours ago|
I have recently been spending time learning go, really really liking the language, awesome standard lib, excellent tooling and great experience.

It sounds like the dumbest thing in the world, but I love the import system auto-adding stuff inside of vscode when I need it. just slick.

nasretdinov 5 hours ago|
I think the fact that package names are URLs is simultaneously genuis and horrifying.
More comments...