Size: a a a

2021 June 19

SG

Sergey Gruzdov in cloud_flood
a = switch b { 1 => "хуй", 2 => "пизда", _ => "ойвэй" }
источник

SG

Sergey Gruzdov in cloud_flood
так?
источник

A

Alex in cloud_flood
Плюс еще с кейс классами
источник

A

Alex in cloud_flood
abstract class Notification

case class Email(sender: String, title: String, body: String) extends Notification

case class SMS(caller: String, message: String) extends Notification

case class VoiceRecording(contactName: String, link: String) extends Notification
источник

A

Alex in cloud_flood
notification match {
   case Email(sender, title, _) =>
     s"You got an email from $sender with title: $title"
   case SMS(number, message) =>
     s"You got an SMS from $number! Message: $message"
   case VoiceRecording(name, link) =>
     s"You received a Voice Recording from $name! Click the link to hear it: $link"
 }
источник

SG

Sergey Gruzdov in cloud_flood
тю
источник

SG

Sergey Gruzdov in cloud_flood
яваеб бля
источник

A

Alex in cloud_flood
Скалаеб
источник

SG

Sergey Gruzdov in cloud_flood
public decimal CalculateDiscount(Order order) =>
   order switch
   {
       (Items: > 10, Cost: > 1000.00m) => 0.10m,
       (Items: > 5, Cost: > 500.00m) => 0.05m,
       Order { Cost: > 250.00m } => 0.02m,
       null => throw new ArgumentNullException(nameof(order), "Can't calculate discount on null order"),
       var someObject => 0m,
   };
источник

SG

Sergey Gruzdov in cloud_flood
источник

A

Alex in cloud_flood
Шарп штоле?
источник

SG

Sergey Gruzdov in cloud_flood
йеп
источник

SG

Sergey Gruzdov in cloud_flood
public record Order(int Items, decimal Cost);
источник

A

Alex in cloud_flood
Нормас, удобно
источник

A

Alex in cloud_flood
Не гомоебля
источник

SG

Sergey Gruzdov in cloud_flood
а кортежи в хуедушилке есть?
источник

SG

Sergey Gruzdov in cloud_flood
или нахуй нинада как обычно?
источник

A

Alex in cloud_flood
источник

SG

Sergey Gruzdov in cloud_flood
asp
источник

SG

Sergey Gruzdov in cloud_flood
источник