![](https://lemmy.world/pictrs/image/f7518097-d1ee-45dd-9d53-27c83a2ba700.jpeg)
![](https://programming.dev/pictrs/image/18669ecb-7565-44e5-ac81-e4ad1296d915.png)
deleted by creator
deleted by creator
10GPa is about 2 billion footballers piled on top of a football field.
tldr: he uses offensive programming
Assuming this is C#, you could just make Reservation a record type, which can be defined with a one line primary constructor, is immutable and has value type equality. Second example is an insane amount of boilerplate.
“This just in, a new study has shown AI poses not material threat to society, go about your business fellow humans”
Misleading description, it’s only a brief summary about Agile/Scrum.
Can’t say I’m a fan of the methodology either…
For my sins I spend a significant part of my time maintaining smalltalk, and it most definitely is not productive.
The syntax is ugly and cumbersome when you start chaining messages. Any advantages the evangelists tout are available in modern languages without the baggage of this dead one.
Today if you want something ‘simple, flexible, interactive’ (interpreted, GC and likely faster) python would almost certainly be a better choice.
I really like nullable types, they can be very effective for writing safer code.
Sometimes there are good reasons to separate object construction and initialization (e.g. composite / loosely coupled objects, or encapsulation of 3rd party libraries) so there can be properties/fields that do not yet have valid values, and using separate queries for this is error prone.
I write a lot of communication interfaces for sensors/actuators and if the communication drops, nullables are a good way to represent invalid readings.
Being able to convey the value and validity in one variable can be more thread-safe and easier to write pure-functions, and show intent.
I occasionally use a nullable for singleton patterns if I’m not 100% convinced there can never be multiple instances, rather than painting myself into a corner with a static class. e.g.
public static MyClass Instance => _instance ??= new();
private static MyClass? _instance;
Maybe also look ip a good component library, for C# I use MudBlazor, which has great documentation that helps a lot to pick the right component for the job, and a lot of the hard work is already done in terms of styles/themes.
For my apps I use the MVVM pattern and write all the backend logic first, then that helps me narrow down the right way to display it.