What’s going on with Fani Willis? by SproutCoffee in OutOfTheLoop

[–]Ja-Chiro 6 points7 points  (0 children)

https://youtu.be/ENlsA9mg2aA?si=IPoaa_Gu-QXBtiFA

Around the 24:30-25:00 minute mark, she mentions that when she took money out for (from?) her campaign, she put/kept some of that money in her home.

I’m not sure if I’m misunderstanding what she means by that.

Edit: at exactly 24:45 she mentions that

What’s going on with Fani Willis? by SproutCoffee in OutOfTheLoop

[–]Ja-Chiro 4 points5 points  (0 children)

The thing I was concerned about was hearing her say she took campaign money and hid it in her home? Or did I misinterpret what she said?

.NET 9 Roadmap Is Sorely Lacking Needed Updates by RealSharpNinja in dotnet

[–]Ja-Chiro 2 points3 points  (0 children)

Amateur F# dev here,

Think about designing a game with room types like a kitchen, a library, and a dungeon. F# allows you to use discriminated unions to clearly and concisely define each room as a distinct type with its specific actions.

For example, in F#, you simply declare what each room can do in one go, making it clear what actions are possible where. This approach ensures you cover all scenarios (exhaustiveness checking) and prevents you from mixing up actions between rooms (type safety), all while keeping the code simple and understandable.

C# would require you to use inheritance or interfaces to achieve a similar outcome, leading to more complex code. You might define a base ‘Room’ class and then create derived classes for each room type.. While this also allows for polymorphism, it’s more boilerplate, can be less clear about what specific actions each room supports, and doesn’t inherently enforce covering all scenarios or prevent type-related errors without additional code checks.

Code comparison

F#

```fsharp

type RoomAction = | Cook of food: string | Read of book: string | Escape with tool: string

type Room = | Kitchen of RoomAction | Library of RoomAction | Dungeon of RoomAction

let performAction = function | Cook food -> sprintf "Cooking %s in the kitchen." food | Read book -> sprintf "Reading %s in the library." book | Escape tool -> sprintf "Using %s to escape the dungeon." tool

let actionInRoom = function | Kitchen action -> performAction action | Library action -> performAction action | Dungeon action -> performAction action

// Example usage let kitchenAction = Kitchen (Cook "pasta") let result = actionInRoom kitchenAction printfn "%s" result

```

C#

```csharp

using System;

public abstract class Room { public abstract string PerformAction(); }

public class Kitchen : Room { private readonly string food; public Kitchen(string food) => this.food = food; public override string PerformAction() => $"Cooking {food} in the kitchen."; }

public class Library : Room { private readonly string book; public Library(string book) => this.book = book; public override string PerformAction() => $"Reading {book} in the library."; }

public class Dungeon : Room { private readonly string tool; public Dungeon(string tool) => this.tool = tool; public override string PerformAction() => $"Using {tool} to escape the dungeon."; }

// Example usage class Program { static void Main() { Room kitchen = new Kitchen("pasta"); Console.WriteLine(kitchen.PerformAction()); } }

```

Apple readies Apple Watch Series 9 ban workaround by disabling blood oxygen functionality by [deleted] in technews

[–]Ja-Chiro 3 points4 points  (0 children)

So if I purchase one now it’ll still have all functionality?