Comments (8)
Any thoughts before I close this?
from language-ext.
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.
If you're interested, I could put NullGuard just into OptionT and UnsafeOptionT, and see what you think from there?
from language-ext.
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.
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.
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.
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.
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:
—
Reply to this email directly or view it on GitHub
#62 (comment).
from language-ext.
Related Issues (20)
- FileIO bug for Test when opening new file for writing
- Directory IO bug for Test when enumerating files
- Simple Kickstart Project available? CodeGen tool is outdated? dotnet8 HOT 1
- Implicit conversion of int? to Option<int> HOT 2
- SequenceParallel performance degradation in 4.4.8 HOT 1
- Refit.ApiException: 'An error occured deserializing the response.'
- Constructor not found for LanguageExt.LongRange HOT 1
- Alternative to inherit from Fin and other monads
- EitherAsync is missing HOT 4
- Add `DoAsync` to Either types (and maybe others) HOT 2
- Release build fails for a big application HOT 5
- v5 resource tracking issue? HOT 6
- Latest v5 alpha IEnumerable<T> ToSeq() extension is missing HOT 4
- v5 await more than a single forked IO, similar to Task.WhenAll HOT 3
- Higher-Kinded Types in Algebraic Free Monads with language-ext?
- Either.Bind triggers memory allocation unlike Either.BindLeft HOT 10
- Missing release notes for 4.4.9 HOT 1
- v5 - Use custom sub-type of Expected losses all custom properties after RunAsync HOT 6
- Use of subtype of Expected throws InsufficientExecutionStackException due to self referencing Head HOT 1
- Extensions: result.GetValueOrDefault() and result.GetValue()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from language-ext.