Code Monkey home page Code Monkey logo

Comments (8)

Jagged avatar Jagged commented on August 16, 2024

Any thoughts before I close this?

from language-ext.

louthy avatar louthy commented on August 16, 2024

Sorry, haven't really had time to follow this up.

Have you seen Tail.Fody

Not that specific plugin no, but I have seen Fody. I think Tail.Fody whilst useful for the end-user, isn't really that useful for language-ext. Also I believe that RyuJIT is supposed to do a better job of dealing with tail-calls, so it's probably moot. It's nearly never an optimisation in C# because loops will always be faster than recursion. I think for the users of Language-Ext they would prefer the speed benefits of a pure functional interface hiding imperative behind-the-scenes (as long as the behaviour is referentially transparent - as with the fold implementations).

There's another for adding null checks to all methods, except for where you specify, eg. OptionUnsafe.
https://github.com/Fody/NullGuard

That's definitely more interesting, but might be a painful process of retrofitting [AllowNull] where it is allowed. I'd be quite cautious about this, because of possible breaking changes. I dunno, I'm torn, because it's obviously a very good idea, and I can't stand the fact that the if(arg == null) checks breaks expression based code.

from language-ext.

Jagged avatar Jagged commented on August 16, 2024

If you're interested, I could put NullGuard just into OptionT and UnsafeOptionT, and see what you think from there?

from language-ext.

louthy avatar louthy commented on August 16, 2024

My understanding is that you can't opt-in, you can only opt-out by using
[AllowNull], so that would be a project-wide change. That is my concern.
There's a ton of code that would need to be considered. Unless you know
otherwise?

It seems to defeat the point having to opt-in.

On Mon, 9 Nov 2015 at 08:20 Will Mooar [email protected] wrote:

If you're interested, I could put NullGuard just into OptionT and
UnsafeOptionT, and see what you think from there?


Reply to this email directly or view it on GitHub
#62 (comment).

from language-ext.

Jagged avatar Jagged commented on August 16, 2024

The opt-in approach would let us get used to it before we risk turning it on across the lot.
Or we rely on the unit tests and hit the big red button...

I'll check and get back to you re project-wide opt-out.

from language-ext.

louthy avatar louthy commented on August 16, 2024

It seems to me to be the kind of thing that would only be valuable project-wide. Otherwise when you look at any cs file you won't know whether it's got the protection it needs [without looking at some project settings]. If you're prepared to take it on project-wide that'd be great, but I wouldn't underestimate the amount of work and the cautious approach you'd need to take.

from language-ext.

Jagged avatar Jagged commented on August 16, 2024

Yes, I hear you there. Just read their outstanding issues and am concerned that maybe it isn't ready for Roslyn yet, which we depend on. Probably shelve it for now methinks, sorry to waste your time there!

(I'll keep an eye on it, it wouldn't surprise me if a patch comes sometime in the coming weeks)

from language-ext.

louthy avatar louthy commented on August 16, 2024

Thanks Will, I don't think it's time wasted. It definitely has potential.
Let's keep an eye on it.

On Mon, 9 Nov 2015 at 08:55 Will Mooar [email protected] wrote:

Closed #62 #62.


Reply to this email directly or view it on GitHub
#62 (comment).

from language-ext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.