DrDeadCrash

joined 1 year ago
[–] DrDeadCrash@programming.dev 2 points 3 days ago

Ok, I'm in for $2 /month too, thanks for setting the standard!

[–] DrDeadCrash@programming.dev 8 points 1 week ago (1 children)

C# is a great language, I don't know much about game dev but I know unity and godot game engines have good support for c#. You can target Windows/Linux/Mac on all the common architectures. All the build tools are available on the command line if that's your thing.

[–] DrDeadCrash@programming.dev 13 points 1 week ago

This is the right idea imo. Tax wealth, not income.

[–] DrDeadCrash@programming.dev 4 points 3 weeks ago (1 children)

Problem is, programmers don't want AI. We want better tools that address the issues of complexity and abstract requirements management.

[–] DrDeadCrash@programming.dev 9 points 1 month ago

But only for them

[–] DrDeadCrash@programming.dev 2 points 1 month ago

I very much disagree with this, Null Reference Exceptions have been a huge problem in c#. Nullable reference types are a partial fix, but the question of "how do I 'return' an error from a statically typed method" is not answered there.

[–] DrDeadCrash@programming.dev 1 points 1 month ago

Thank you, I'd love to hear back from you.

[–] DrDeadCrash@programming.dev 1 points 1 month ago

Check the edit on the post, I thought I had linked to the GitHub page but I guess the image overrides that.

Link: https://github.com/Andy3432344/SafeResults

[–] DrDeadCrash@programming.dev 1 points 1 month ago

Check the edit on the post, I thought I had linked to the GitHub page but I guess the image overrides that.

Link: https://github.com/Andy3432344/SafeResults

[–] DrDeadCrash@programming.dev 1 points 1 month ago

The operator being applied to the ResultObject will always resolve to the Generic type that was specified as 'T in IResult. If the function is not successful the resolved value will be whatever value was supplied to the ResultObject constructor, the opt.None property will true and the opt.Some property will be false.

[–] DrDeadCrash@programming.dev 2 points 1 month ago

The example is simplified, but I dislike returning null in my own code. The function will always execute, left or right doesn't matter it's mapped across in the ResultObject class.

The function must return an IResult, the ResultObject analyzes the IResult checking for IFail or IOk. If it's IOk the value of type T is retrieved from the Value property of the IOk object and returned, the Some property defaults to true. If the IResult is an IFail, Some is set to false, it copies the message from the IFail object into the ResultObject, and returns the value the was supplied to its constructor.

I'm just sharing something I find useful, and I hope I can make it useful for others as well. Thanks for the questions.

17
submitted 1 month ago* (last edited 1 month ago) by DrDeadCrash@programming.dev to c/csharp@programming.dev
 

A collection of tools for dealing with nulls, failures and the generic type issues that arise in this domain.

https://github.com/Andy3432344/SafeResults

I'm the author, let me know what you think!

*Edit: updated to show GitHub link, sorry!

[–] DrDeadCrash@programming.dev 23 points 2 months ago (2 children)

They even know they're being lied to, and still go along.

 

Hi everyone, I'm trying to try out F# via FSI in VS Code (Windows 10)

I have Ionide for F# installed, and have used it before, but now every time I try to start it I get a message "FSI :Start resulted in an error", it goes on to helpfully report "the option has no value".

dotnet is in path, dotnet works great. FSI? nothing.

I also have the .net workload installed for visual studio 2022 (if that matters).

I started up my Linux VM (KDE Neon) fired up vs codium and tried FSI Start...same error! So no tinkering in f# for me tonight. Does anyone have an idea what's happening, across two environments? Google is no help...

view more: next ›