Lol no generics

lol no generics

Other urls found in this thread:

crystal-lang.org/
ponylang.org/
twitter.com/SFWRedditImages

lol no ternary operator

another day another go hate thread

what are generics

A simplified form of templates.
On the JVM and CLR generics have some runtime implications.

lol no bloat

rob pike said I don't need generics

>lol no functionality
ftfy

Abstraction over data types.
Go programmer copy and paste similar functions because had different type.

Only sort,associative arrays build-in and some math functions had generics behavior.

Rob pike thinks you're to stupid for generics.

They're actually planning to get generics.
They just can't decide on the best way to implement it.

Is it on some official place that they are planning? Future of Go presentation from GopherCon 2017 says they don't have any concrete examples where it solves something or where it's necessary, thus can't have clear reasoning over implementation. So far I've only seen random blogposts mentioning they want genereict in Go 2.0, not that they will for sure be there.

I remember some document with different methods and pros and cons. You might be able to google it.

AFAIK they are happy to add generics if they can be added without affecting performance

You mean the Summary of Go Generics Discussions advertised in FAQ or something else?

They could have added lightweight templates instead from the start and there would have been zero overhead. Same with a better type system.

The Google Docs document?
Yeah.

>no bloat
>hello world binary is 3MB
LMAO

They don't just care about run-time performance.
Fast compile times are very important to them too.

>unstripped and statically linked binaries are large
amazing

>strip go binary
>it segfaults
amazing

>lying on the internet

You can have that with templates, though.
See dlang/Jai compile times. C++ is just fucked thanks to headers.

Honestly, give me one good example of generics in a real product (not my ultra special fizz buzz) that cannot be replaced by a macro.
We don't need generics all we need is a good macro implementation.

>>/r/programmingcirclejerk

>Honestly, give me one good example of generics in a real product (not my ultra special fizz buzz) that cannot be replaced by a macro.
The point is to get better and more standardized error messages when expansion fails for some reason.
In theory you could replace all other kinds of metaprogramming with compile time execution and AST manipulation API, but it's still not a thing in the normie business world for reasons.

lol no null safety
lol product types for error handling
lol no immutable variables

guys what is generics??

parametric types

crystal-lang.org/
>but muh parallelism (not concurrency)
ponylang.org/

why are you here

nim > go

if err != nil {
// lol no generics
}

tips.unwrap().fedora.unwrap()

the yagsbarro of Sup Forums

Nim is powerful, but buggy, bloated and weird in the wrong places. Go is dumbed down, but solid, small and predictable.