Похожие чаты

Let guess = match strconv.Atoi(text) { Ok(n) => n,

Err(_) => continue,
}


vs


guess, err := strconv.Atoi(text)
if err != nil {
continue
}


right?

6 ответов

8 просмотров

Rust can be even better: let Ok(guess) = strconv.Atoi(text) else { continue };

Roman-Sharkov Автор вопроса

well as is Go vs Rust

Roman-Sharkov Автор вопроса
Thomas
well as is Go vs Rust

nope, Go and Rust are fundamentally different

Roman Sharkov
nope, Go and Rust are fundamentally different

Everything about this example is just syntactic difference

Thomas
Everything about this example is just syntactic di...

You could say Rust also has slight type system advantages, but very minor

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

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

Anyone here suffers from unexplained aural migraines, who would be up for talking for a bit? Doesn't *have* to be aural, but I am not asking about headaches, I mean actual mi...
Martin Rys
55
We heading to 1.1$ 🤔?
CryptoBo$$
35
A couple thoughts from a random internet stranger: 1. If you want this project to gain traction you cannot keep being negative. If I just came here after finding out about Kd...
Eric Wild
46
А если для werf организовать отдельный репозиторий, а сервисы из проекта подключить как симлинки? И симлинки в гитигнор добавить?
Dmitriy Andreev
13
Сonst magicTgHTML = (text, entities) => { let processedText = text; let offsetShift = 0; entities.forEach(entity => { const { offset, length, type, url, ...
Андрей
1
Ideally, when we launch a game from a particular studio, that studio should have the right to access the uniqs from their game on our wallet. For example, if you die in a Ubis...
Lisandru
16
i justHey. Im holding kadena almost 3 years now. Its my only investment what isn't in profit. But i thought for years that its just need some more time but i haven't seen that...
Riki
7
Ребят, всем привет. Недавно начал знакомиться с werf с целью автоматизировать сборку локальных dev стендов. Прошел гайд, почитал статьи на хабре. Появилось некоторое понимание...
Dmitriy Andreev
4
Who understand exactly the uniqd in game ? Does it mean that transactions are auto signed inside the game without interruption? If yes , then how can ultra retrieve elements...
Zaa
15
Всем здравствуйте!) У меня такой вопрос. Есть два роута, роут1 и роут2. Они связаны с очередью some_queue. По задаче предполагается, что есть два паблиша. Паблиш1 отправляет...
Format
10
Карта сайта