Telegram Group & Telegram Channel
Алиса копается
&[T; N] автоматически умеет приводиться к &[T], поэтому третий код, конечно, работает в обеих вариациях. Остается вопрос, что происходит при выводе типов. На практике оказывается, что b2 работает, а a2 не работает, т.е. тип элемента массива "жадно" выводится…
Правильный ответ: не скомпилируется строка 1. Все остальные соберутся.

Почему 1 не собирается, а 2 собирается — в целом логично: опять тип выводится исходя из первого встреченного аргумента. Тут ничего нового по сравнению с [_; 2].

Почему и 3, и 4 собираются мне, опять же, неизвестно. Здесь вывод типов устроен как-то иначе. С match, к слову, то же самое, т.е. от (не)ограниченности количества объединяемых типов результат не зависит.



group-telegram.com/alisa_rummages/188
Create:
Last Update:

Правильный ответ: не скомпилируется строка 1. Все остальные соберутся.

Почему 1 не собирается, а 2 собирается — в целом логично: опять тип выводится исходя из первого встреченного аргумента. Тут ничего нового по сравнению с [_; 2].

Почему и 3, и 4 собираются мне, опять же, неизвестно. Здесь вывод типов устроен как-то иначе. С match, к слову, то же самое, т.е. от (не)ограниченности количества объединяемых типов результат не зависит.

BY Алиса копается


Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260

Share with your friend now:
group-telegram.com/alisa_rummages/188

View MORE
Open in Telegram


Telegram | DID YOU KNOW?

Date: |

On Telegram’s website, it says that Pavel Durov “supports Telegram financially and ideologically while Nikolai (Duvov)’s input is technological.” Currently, the Telegram team is based in Dubai, having moved around from Berlin, London and Singapore after departing Russia. Meanwhile, the company which owns Telegram is registered in the British Virgin Islands. In 2018, Russia banned Telegram although it reversed the prohibition two years later. These entities are reportedly operating nine Telegram channels with more than five million subscribers to whom they were making recommendations on selected listed scrips. Such recommendations induced the investors to deal in the said scrips, thereby creating artificial volume and price rise. Individual messages can be fully encrypted. But the user has to turn on that function. It's not automatic, as it is on Signal and WhatsApp. In addition, Telegram's architecture limits the ability to slow the spread of false information: the lack of a central public feed, and the fact that comments are easily disabled in channels, reduce the space for public pushback.
from ms


Telegram Алиса копается
FROM American