bugsmith

joined 2 years ago
MODERATOR OF
[โ€“] bugsmith@programming.dev 1 points 2 years ago* (last edited 2 years ago)

I asked ChatGPT to summarize from the video transcript:

"In the video, the presenter discusses a challenge in object-oriented programming related to changing the runtime type of objects. Using the example of invoices in a bookstore application, they demonstrate how the State design pattern is commonly used to address this issue but comes with limitations. They introduce the functional programming approach as an alternative, emphasizing the creation of types rather than classes and the use of abstract records and extension methods. The functional programming approach simplifies the implementation, avoids the need to change runtime types, and offers advantages such as shorter code. The presenter encourages viewers to consider adopting functional programming principles, especially with the evolving nature of languages like C#."

I'm not entirerely sure I agree with his premise. I totally see the merits of functional programming (either pure or blended with traditional OOP), but I don't think his example really solves the ORM problem any better than if he'd not used a deliberately contrived OOP example intended to make make his point look better.

[โ€“] bugsmith@programming.dev 1 points 2 years ago* (last edited 2 years ago)

I have moved all my domains to Porkbun.

They are nearly always the cheapest when I compare, and they offer a good service.

[โ€“] bugsmith@programming.dev 5 points 2 years ago* (last edited 2 years ago)

I mean, it's syntactic sugar but for the most part it will perform in line with how the average Joe expects classes to work.

I use them sometimes. I avoid them other times.

If you're new to JavaScript, go ahead and use them and if you find s usecase where they don't work to your expectatiob you can start learning about why there aren't "true oop classes".

[โ€“] bugsmith@programming.dev 1 points 2 years ago

It horrifies me that my key card typing speed is slightly closer to your mobile typing speed. Wow.

I'm a programmer by trade, so do a fair bit of typing. But my speeds just never reached anything like yours. How have you become so fast?

For what it's worth, I do touch type (possibly not perfectly) and use the standard UK Qwerty layout.

view more: โ€น prev next โ€บ