!ydIAqzRPCpqoMWmoMi:matrix.org

Golang

480 Members
The Go programming language76 Servers

Load older messages


SenderMessageTime
23 Jul 2021
@xaionaro-guest:matrix.dx.centerDmitrii Okunev (at work)And ironically, generics are not something personally I'm waiting for :(11:37:57
@xaionaro-guest:matrix.dx.centerDmitrii Okunev (at work) * And ironically, generics are not something I'm waiting for.11:38:01
@xaionaro-guest:matrix.dx.centerDmitrii Okunev (at work) * And ironically, generics are not something personally I'm waiting for :(11:38:09
@moritz:moritz.shMoritzI don't really care about generics either… I am just fearful of the things to come.11:39:10
@moritz:moritz.shMoritzI have one use case where they would be remotely useful11:39:26
@xaionaro-guest:matrix.dx.centerDmitrii Okunev (at work) * Basically the absence of immutable variables (except for string) is the main reason why I'm thinking about converting into Rust. 11:45:26
@alex.y:matrix.orgalex.yov joined the room.12:17:18
@ezaquarii:etacassiopeiae.netezaquariiI'd really appreciate easy way of defining custom error types, without implementing full interface. Generics probably could help here, even if it's limited like in case of a map.16:38:51
@ezaquarii:etacassiopeiae.netezaquariiInterestingly, i don't see much issue with immutability as I don't see ppl doing bad stuff. Most are like Pythonistas: grown up and responsible (one of the arguments Python uses against strict protections).16:42:05
@moritz:moritz.shMoritzi had to put 128 big.Int into a function each instead of just making immutable variables… it's just a hazzle16:54:09
@moritz:moritz.shMoritzcompany policy16:57:00
@moritz:moritz.shMoritz"permission values must not be changable" so into functions they go16:58:45
@moritz:moritz.shMoritzwhy did we need 128 permission bits? because legacy software16:59:21
@finnbear:matrix.orgSquirrel joined the room.19:01:24
@finnbear:matrix.orgSquirrel changed their display name from finnbear to Squirrel.19:02:33
@finnbear:matrix.orgSquirrel set a profile picture.19:04:19
@discordian:matrix.thedisco.zoneDiscordian
In reply to @vladyslav:matrix.webdevelop.pro
a lot
I personally don't see a big deal in that
idm people using them ofc, but abusing them would be unfortunate IMO
19:12:11
@discordian:matrix.thedisco.zoneDiscordianBiggest use-case I'd have for generics I can think of is just math.19:13:41
@diamondburned:matrix.orgdiamondburnedI'll be using generics mostly for container data types19:33:30
@diamondburned:matrix.orgdiamondburnedwould be nice to have a glib.List[T] type19:33:47
@moritz:moritz.shMoritzbeing able to tell a function "every kind of number is cool" would be more than enough for me19:37:21
24 Jul 2021
@markyjackson:matrix.orgmarkyjackson joined the room.08:53:49
@markyjackson:matrix.orgmarkyjackson set a profile picture.09:03:04
@condaatje:matrix.orgcondaatjeA (debatable) claim: there is no situation in golang where a generic would be superior to an interface20:25:15
@discordian:matrix.thedisco.zoneDiscordianMath library20:33:50
@moritz:moritz.shMoritz
In reply to @moritz:moritz.sh
being able to tell a function "every kind of number is cool" would be more than enough for me
condaatje: you can currently only do this by accepting the empty interface and doing a typeswitch, and even then you'd have to still cast the result in the target function. Or at least that is to the limit of my knowledge. Open for counterexamples
20:46:32
@diamondburned:matrix.orgdiamondburnedgenerics have some overlaps with interfaces, but the rest are not the same21:17:56
@diamondburned:matrix.orgdiamondburnedgenerics are more for accepting certain types (>1), while interfaces are for accepting any type with the wanted methods21:18:30
@mvdan:matrix.orgmvdan joined the room.22:16:31
25 Jul 2021
@unsign3drequ3st:matrix.orgUnsign3dRequ3st joined the room.01:42:11

There are no newer messages yet.


Back to Room List