Похожие чаты

Whats the good reason for not having generics available in

Go? Coming from ruby/js background, it gets dull writing trivial day to day (repetitive) functions - before you even get to the logic.

17 ответов

10 просмотров

wait for version 2

go is extremely opinionated

I'm starting to wonder if we really need generics or can we just use interfaces

Thirteen
Interfaces are not good enough in other scenarios.

But what are those scenarios? That's what I was asking

Harry-Cee Автор вопроса
DᴜᴍʙMᴀʜʀᴇᴇᴏ
But what are those scenarios? That's what I was as...

A simple application is finding the sum of floats or int types

DᴜᴍʙMᴀʜʀᴇᴇᴏ
But what are those scenarios? That's what I was as...

I'm thinking about DB orms, powerful tools can born in this era. Also the removal of many code generators


I'm thinking about DB orms, powerful tools can bor...

Generics aren’t solve that problem. Only macroses can be a replacement of the code generation.

Zver
Generics aren’t solve that problem. Only macroses ...

Macros are another thing that should be added in Go. Rust macros are just so good

Zver
Generics aren’t solve that problem. Only macroses ...

Typed parameters are to solve such problems, and they play a huge part in ORMs. And go generics will be about typed parameters as far as I've read

The reason was they wanted something solid before they added them to language.

DᴜᴍʙMᴀʜʀᴇᴇᴏ
Macros are another thing that should be added in G...

I heard somewhere that the go team strongly dislikes macros because you don't normally see what code the compiler actually reads so it can leady to error messages which don't make sense to the user.

https://golang.org/doc/faq#generics

Похожие вопросы

Обсуждают сегодня

Какой-то там пердун в 90-х решил, что есть какая-то разная типизация. Кого вообще это волнует?
КТ315
49
Hi. Do we have a raid bot? Why nobody doing raids on X? Even RH mentioned this and nobody paying attention...whats the channel for hex memes? If mods cant run raids just insta...
H
31
Подскажите, а есть vault lite или ченить такое?) А то нужен вольт для похода в вольт, но весит он ~500 мб) как-то многовато для парочки запросов ))
Alexandr Orloff
17
блеать, почему так?? где в роутере это исправляется?
Арсен Маньяков 🇦🇲
16
void terminal_scroll() { memmove(terminal_buffer, terminal_buffer + VGA_WIDTH, buffer_size - VGA_WIDTH); memset(terminal_buffer + buffer_size - VGA_WIDTH, 0, VGA_WIDTH); ...
Егор
47
🌊 Ocean Nodes Dashboard Update 🚀 Hey, Oceaners! First off, a massive round of applause 👏to all of you for the amazing engagement since we launched Ocean Nodes. In just a few ...
KreigDK | Never DM first🌊
3
Всем привет! Подскажите, пожалуйста, в чем ошибка? Настраиваю подключение к MySQL. Либы лежат рядом с exe. Все как по "учебнику"
Евгений
16
А можете как-то проверить меня по знаниям по ассемблеру?
A A
132
Здравствуйте! У меня появилась возможность купить книгу "Изучай Haskell во имя добра!". Но я где-то слышал, что эта книга устарела. Насколько это правда??
E
22
люди, которые используют flameshot, к вам вопрос. Можно-ли поставить хоткей на создание скриншота? В программе есть отдел "горячие клавиши", но там все для редактирования, скр...
ThunDer104
11
Карта сайта