|
look if you want to type safely just buy a kinesis advantage pro, it's compatible with any language and it looks and feels great.
|
# ? Jul 29, 2018 23:11 |
|
|
# ? Jun 4, 2024 10:08 |
|
it also has a foot pedal which is great if you use modal typing systems
|
# ? Jul 29, 2018 23:13 |
|
comedyblissoption posted:interface{} everywhere is a golang idiom, because the golang standard library itself uses the idiom of forcing consumers to use interface{} everywhere and giving language users the worst of both dynamic and static typing the vast majority of that list uses interface{} for reflection, which is a legitimate use of interface{} since you're inspecting the RTTI anyway a small portion of it is to make up for a lack of sum types (which also sucks) there are a couple cases like context when the user is providing an arbitrarily-typed value and is the only one getting it back later but multiple users are providing values, all of differing types, so there's no single type to parameterize over none of those would be helped by generics the rest are things like sync.Map or the useless container/* packages where generics would certainly fix everything Volte posted:What's the alternative don't try to write a generic data structure because you can't. use the built in generic types like slice and map, if you can, and write a type-specific data structure if you cannot (which is often fairly simple to do in terms of slices and maps) algorithms are simpler because you can define them in terms of an interface, like sort.Interface does it
|
# ? Jul 29, 2018 23:13 |
|
Volte posted:What's the alternative
|
# ? Jul 29, 2018 23:35 |
|
cursed image
|
# ? Jul 30, 2018 00:42 |
|
im the three separate I-beam cursors in the last image
|
# ? Jul 30, 2018 00:45 |
|
fixed for appropriate score https://www.youtube.com/watch?v=nV76z7B7lsY
|
# ? Jul 30, 2018 01:05 |
|
I'm the missing edge cases for floats
|
# ? Jul 30, 2018 01:07 |
|
Volte posted:What's the alternative https://www.reddit.com/r/rust/comments/5penft/parallelizing_enjarify_in_go_and_rust/dcsgk7n/
|
# ? Jul 30, 2018 01:22 |
|
this is a sacrilege against the great vision of Rob "colors are for children" Pike
|
# ? Jul 30, 2018 01:50 |
|
MALE SHOEGAZE posted:look if you want to type safely just buy a kinesis advantage pro, it's compatible with any language and it looks and feels great. Can confirm; strong typing goes well with static typing. Been using a Kinesis Advantage for years (not Pro because I am an academic).
|
# ? Jul 30, 2018 14:12 |
|
TIRED: relentlessly mocking interface{} WIRED: making fun of https://golang.org/pkg/sort/ and everything implemented like it nbsd is it still haram if I use a container of interface{} as the under-the-covers implementation of a typesafe container? At that point, the copypaste is reduced from "whole implementation" down to "just the interface methods, full of typecasts".
|
# ? Jul 30, 2018 19:21 |
|
everything in sort is fine except sort.Slice which is dumb
|
# ? Jul 30, 2018 19:58 |
|
Lonely Wolf posted:everything in sort is fine except sort.Slice which is dumb yeah, I agree that sort is okay (if clunky) package sort is also a golden example of how, in go, things that you normally would use generics for don't have to use interface{}
|
# ? Jul 30, 2018 20:06 |
|
prisoner of waffles posted:TIRED: relentlessly mocking interface{} this is some tragic poo poo. does go not even have operator overloading?
|
# ? Jul 30, 2018 21:30 |
|
prisoner of waffles posted:yeah, I agree that sort is okay (if clunky) edit: I guess that's got nothing to do with interface{} but christ, the whole problem could have been avoided
|
# ? Jul 30, 2018 21:44 |
|
people are constantly complaining about go. why does anyone use it?
|
# ? Jul 30, 2018 22:26 |
|
your periodic reminder that they haven't said no* to generics (just no to many of the performance or structural characteristics common to generics in other languages) if you are like "I am a genius and they just need to add generics liek _so_" you can go and take a dang look at the proposal-in-the-abstract: https://github.com/golang/proposal/blob/master/design/15292-generics.md and at the 4 concrete proposals, all of which were not accepted but serve as examples of what functionality they want: https://github.com/golang/proposal/blob/master/design/15292/2010-06-type-functions.md https://github.com/golang/proposal/blob/master/design/15292/2011-03-gen.md https://github.com/golang/proposal/blob/master/design/15292/2013-10-gen.md https://github.com/golang/proposal/blob/master/design/15292/2013-12-type-params.md
|
# ? Jul 30, 2018 22:32 |
|
C is scary I guess And cpp is cpp
|
# ? Jul 30, 2018 22:33 |
|
Rob Pike posted:C is scary I guess
|
# ? Jul 30, 2018 22:36 |
|
Toady posted:people are constantly complaining about go. why does anyone use it? Does anyone actually use it on a large scale? All I've seen of examples are Google and a lovely wine app company in copenhagen.
|
# ? Jul 30, 2018 22:43 |
|
Lol
|
# ? Jul 30, 2018 22:43 |
|
prisoner of waffles posted:your periodic reminder that they haven't said no* to generics (just no to many of the performance or structural characteristics common to generics in other languages) none of this matters it's too late they needed generics on day one. ten years of banging void{} around, including in the stdlib itself, dictates that it will always be turbofucked think how long the hangover of no-generics, then type erasure, haunted java. (and that language had much greater overall uptake + billions of dollars of investment from multiple vendors!)
|
# ? Jul 30, 2018 22:50 |
|
Boiled Water posted:Does anyone actually use it on a large scale? All I've seen of examples are Google and a lovely wine app company in copenhagen. don't forget kubernetes even if very few people choose to develop new things in go, they're still affected by the "quality" of the golang ecosystem
|
# ? Jul 30, 2018 22:51 |
|
none of those are language proposals, they are essentially vague requests for someone else to please start thinking about making a language proposal go will never actually do generics because they introduce way more complexity than the go implementors are comfortable with. go is not quite python levels of "gently caress you we'd rather be slow than weird" but they're not adventurous people
|
# ? Jul 30, 2018 22:53 |
|
Notorious b.s.d. posted:none of this matters you’re discounting the possibility of a gotwo which could ignore backwards compat. i thought that was the plan but i haven’t followed it in a whole
|
# ? Jul 30, 2018 23:04 |
|
MALE SHOEGAZE posted:you’re discounting the possibility of gotwo which could break apis and stuff. i thought that was the plan but i haven’t followed it in a whole making gotwo would be almost as worse as making something not backwards compatible, but with everything proposed crammed in there called go++
|
# ? Jul 30, 2018 23:06 |
|
Boiled Water posted:making gotwo would be almost as worse as making something not backwards compatible, but with everything proposed crammed in there maybe that’s always been the plan. they’re just waiting for bjarne to do it.
|
# ? Jul 30, 2018 23:08 |
Has anyone written a blog post called "go, too, considered harmful"?
|
|
# ? Jul 30, 2018 23:12 |
|
MALE SHOEGAZE posted:maybe that’s always been the plan. they’re just waiting for bjarne to do it. he'll be in the cold ground before being allowed to invent anything like that again
|
# ? Jul 30, 2018 23:15 |
|
I want to fork go and call it went.
|
# ? Jul 30, 2018 23:37 |
|
VikingofRock posted:Has anyone written a blog post called "go, too, considered harmful"?
|
# ? Jul 30, 2018 23:40 |
|
go 2 considered harmful
|
# ? Jul 30, 2018 23:52 |
|
Space Whale posted:I want to fork go and call it went. Go New Edition
|
# ? Jul 30, 2018 23:52 |
|
Space Whale posted:I want to fork go and call it went. go for Windows 3.1 with workgroups
|
# ? Jul 31, 2018 00:28 |
|
goto 1980
|
# ? Jul 31, 2018 00:59 |
|
Space Whale posted:I want to fork go and call it went. this reminds me of a bumper sticker I saw on a door once that read HONK IF YOU FSCK
|
# ? Jul 31, 2018 02:27 |
|
pokeyman posted:this reminds me of a bumper sticker I saw on a door once that read HONK IF YOU FSCK i've never had to
|
# ? Jul 31, 2018 02:35 |
|
Boiled Water posted:go for Windows 3.1 with workgroups wfw 3.11, never forget
|
# ? Jul 31, 2018 03:29 |
|
|
# ? Jun 4, 2024 10:08 |
|
Notorious b.s.d. posted:they needed generics on day one nah considering golang is skyrocketing in popularity and java is not
|
# ? Jul 31, 2018 03:29 |