Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
I am just learning Go and the fact that it gets so many things right are what make the things that seem 'less right' so frustrating. The type system feels like more of a straight jacket than an actual tool. A good type system can be expressive and powerful in addition to just making your code typesafe.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

ATM Machine posted:

because tumblrthe internet is a thing that exists

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Overloading or dynamic dispatch or really any number of things. (I don't quite understand the meaning of overloading in a language without classes, though, care to elaborate?)

Or like the example here with the linked list:

http://yager.io/programming/go.html

You can sorta simulate something this with interfaces (I guess?) but now you've lost any meaningful type safety.

I dont know why go is this way aside from the compilation speed thing maybe? I'm an idiot so I can only speculate. It's a Bad Type System.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Sub Par posted:

Edit: nevermind, I'm just going to do this in JS.

Go everyone!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Go really needs function overloading, imo. It makes the clutter from not having generics that much worse, because now add(foo_type) has to be written to add_foo_type(foo_type) which is annoying.

After spending time with the language, I stopped caring about that because I started accepting go's thesis re: simplicity and lack of indirection.

My main complain about go these days is that the community is full of luddites who are hostile towards both useful language features and anyone introducing a new library that attempts to do...anything. My main experiences are on the golang reddit, though, which is no longer an official community. So maybe it's not representative of the real go community.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Coffee Mugshot posted:

The debugger is delve and delve is good but not sufficient IMO. Derek Parker doesn't have enough real life time to make it much better, either, unfortunately.

If only Golang had a large corporate backer with the resources and motivation to develop a functional go debugger.

And of course, if Google were to release one, it would be balked at by the Go community as "over complicated." This would be followed by blog posts explaining why printf debugging is actually good, because it's easy to understand, and debuggers are bad because no one can understand how they work.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Ghost of Reagan Past posted:

I'm writing a lovely, bare-bones NES emulator for shits and giggles. What's a good library for graphics for someone who doesn't do graphics?

EDIT: Basically I'd just like the ability to draw pixels on a screen. I don't need much, but I also don't know exactly what I need, and I don't work with graphics at all professionally. I ALSO don't really know Go and I'm using this as a way to learn some.

EDIT #2: As a Python programmer I want to scream at some of this. Why is there no 'in' operator? Why does writing a for each loop require extra syntax? Why is gofmt such a dick? Give me the gun to shoot my own face off, please, I'm a competent programmer, I swear.

I honestly wouldn't use go for this. Go is great for keeping poo poo simple but if you want to abstract over anything, go use a language with actual features.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

bonds0097 posted:

Why the move away from serverless? Performance?

in my experience, lamdas / microservices are a function that maps simple problems to complex distributed systems problems

DONT THREAD ON ME fucked around with this message at 12:04 on Feb 27, 2018

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Khorne posted:

Go is good tool for web services and similar applications. I've used it off and on since 2014 and as long as you don't venture too far from that realm it's truly well designed. It's also not bad for command-line/one-off programs that most people would probably reach for Python/bash/perl/whatever to make. Its portability, single day learning curve, ease of developing in, and ease of setting up its environment are all great. It has similar level performance to pretty much anything for web stuff. It's not slow and carrying five tons of baggage like lots of the common web backend languages, and it doesn't require significant developer investment like C++ or functional languages. It also doesn't require consuming a bloated corpse like the JVM languages.

Its package management left a lot to be desired last time I used it, but it was supposed to be fixed at some ambiguous time in the future which may have already happened.

Due to the positives, people often use it for things it's real bad at. It is missing language features that are very useful for certain types of applications, but it's mostly intentional to make the language better at what it's good at. It's a current-gen tool for a specific type of program and a drat good one.

Can't quote this hard enough.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Helicity posted:

I personally disagree with the "web services" part unless you're only responsible for a small API footprint. Serialization/deserialization feels tedious to me for a few reasons, and web services are one of the best places to lean heavily on functional programming ideas and patterns since the whole request/response pipeline is essentially a mapreduce.

edit: Golang would be a lot more fun for me on certain things if there was an equivalent of JS's lodash library, or even better, Kotlin+arrow. Is there such a thing?

any such library would need to lean heavily on interface{}. in a typed language you need generics if you want a library like lodash.

i agree though, go can really only support certain kinds of web services, ones that don’t stray much into business domains.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
here we go:
https://blog.golang.org/go2draft
https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md
https://go.googlesource.com/proposal/+/master/design/go2draft-generics-overview.md
https://go.googlesource.com/proposal/+/master/design/go2draft-error-handling-overview.md

DONT THREAD ON ME fucked around with this message at 17:41 on Aug 28, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply