Имплиситы в Окамле
СМОТРИ СЭНОК, ЭТО ИМПЛИСИТЫ В ОКАМЛЕ Госпади, как красиво module type Show = sig type t val show : t -> string end let show { : Show} x = S.show x implicit module Show_int = struct type t = int let show x = string_of_int x end implicit module Show_float = struct type t = float let show x = string_of_float x end implicit module Show_list {S : Show} = struct type t = S.t list let show x = string_of_list S.show x end let () = print_endline ("Show an int: " ^ show 5); print_endline ("Show a float: " ^ show 1.5); print_endline ("Show a list of int: " ^ show [1; 2; 3]);
На изображении сердитая полосатая кошка смотрит на маленького чёрного котёнка, рядом показан фрагмент кода на OCaml с имплиситными модулями. Подпись шутливо представляет сложную и необычную конструкцию языка как нечто прекрасное, вызывая восторг у программиста и недоумение у окружающих. Такой мем отправляют, когда находят особенно изящное, перегруженное или непонятное техническое решение. EN: A grumpy tabby cat looks at a tiny black kitten, while a fragment of OCaml code with implicit modules is shown beside them. The caption jokingly presents a complex and unusual language construct as something beautiful, expressing a programmer’s delight and everyone else’s confusion. This meme is shared when someone discovers an especially elegant, overengineered, or incomprehensible technical solution.
- @profunctor_io / 5667 2020-10-24
- Type
- image
- Size
- 800×600 · 127.2 KiB
- Mood
- саркастичный, восторженный
- Language
- ru
- Added