gregoryyoung / nothing Goto Github PK
View Code? Open in Web Editor NEWReplacement of the System.Void type
License: The Unlicense
Replacement of the System.Void type
License: The Unlicense
The Nothing type needs to correctly support serialization and deserialization so that the "Nothing.Instance == Nothing.Instance" is always true :)
The "Nothing" type supports the "null" value in addition to the "Instance" value. That's a bug. Please update your programming language to make sure that it doesn't permit null values of this type under normal use. Do not close this issue until you have successfully done this.
SMH no commits on this project for years. My enterprise is using this for a very critical function in our FizzBuzz factory and I need my features to be implemented! It can't even be that hard. You need to take your responsibility as an open source author more seriously.
I keep checking for updates, but there's Nothing here.
With the proposal to add Zero, I suggest we rename "Nothing" to "One", or perhaps "Something".
Maybe something like:
public class Zero
{
private Zero() { }
public static T For<T>()
{
throw new Exception();
}
}
Personally, I don't understand the benefit/purpose of trying to replace the void
type with Nothing
other than, arguably, slightly better readability. I could argue that this library adds an extra layer of complexity given Nothing
doesn't really appear to be nothing (it retains an internal instance).
I think as part of the README you should justify your reasoning for the use of Nothing
vs void
.
I would encourage you to add a reference to William Shakespeare, who first came up with the idea, see here
The .NET community has a problem acknowledging the original creators of ideas and their connections to other technical, theatric and dramatic communities. Please set an example to the community in this regard.
I'm looking for ways to contribute to this project and thought setting up a CI server for it might be the best place to start.
What should we use for CI on this one? Is Travis enough? I'm OK with setting up a dedicated Jenkins server if people think we'll need the throughput.
I assume this needs to be built and tested cross-platform too.
You know, like a ToUnit
for F#.
I don't know much about what's going on with VB these days, but I'm assuming they'd want like an Option Nothing
or something so you should probably add that too.
This library is great for representing that there is no thing. But what if we need to be more specific about what we do not have? This library needs NoOne, NoChance, NoIdea etc.
I know this is a small framework in all, but where are the unit tests? It even has unit as the name!
To be a well rounded Framework I suggest making it more symetrical by adding an All type. With All and Nothing it is surely a framework I would bet on.
Can we run this on FPGAs? Or at least GPUs?
We need to make sure this gets a security review. With this recent events in the news, we need to be confident that this won't allow attackers to gain access from an exploit. My company won't allow any code that hasn't been thoroughly reviewed.
Hi,
I've read somewhere that I can't be cool w/o doing everything mentioned in the subject, so I wonder if this is yet another thing I need to take a stake on in order to keep my hipster badge?
Let's get all strings moved to a resource file and get started localizing. I will volunteer to take Klingon. I'm halfway done already.
Since framework looks pretty mature right now I think we should focus on the most serious goals. Maybe it should be rewritten using vanila javascript, renamed to nothing.js and eventually transpiled to .NET framework to maintain good web scalability.
Given good ideas live forever and everything starts from nothing. I see this becoming the next big thing.
Has 0 dependencies, you cannot get more stable than that #bigWinRightHere. From now on I will use it as foundation to bootstrap our enterprise wide projects.
Where do I get your logo this is definitely our competitive advantage and I want to make it visible on our corporate site.
Awesome job guys!
I think an important feature is how nothing performs, so I would like a performance metrix to ensure it provides industry leading performance. With nothing being essential to lots og applications, how it performs is critical.
Useful for conversion between different types. Should also support converting to/from strings with the values "Nothing", "Nada" and "Zilch"
Please reimlpement this functionality using the "micro-actor" approach being so persuasively advocated by @gregoryyoung. See https://twitter.com/gregyoung/status/628618631895744514
The modification should not be in the license because Nothing can't be modified
As mentioned in this issue, this framework needs a roadmap. We all know no one use a framework until it reaches at least version 2.0 or 3.0. Version 1.0 is just a hack.
Please add a roadmap so we can have confidence that "Nothing" is actually going "somewhere" (ha ha), and won't just stagnate like so many promising projects before it.
Someone has stolen this idea, and used it for a far more successful product
https://github.com/kelseyhightower/nocode/
I'm attempting to at least get them to acknowledge it: kelseyhightower/nocode#4833
The age of the data scientist is upon us. In the era of big data we need frameworks that can handle the uncertainty and scale inherent in the never-ending rivers of data observations coming from IoT, DevOps, web analytics and microservices.
Now, ask yourself: what is at the heart of this? What is the core problem that no one has addressed? What does that data contain most of the time? Yes!! Nothing!!!!
What could possibly be more central to the challenges faced by the data industry than a scalable, streaming and inherently probabilistic treatment of Nothingness?
The timeliness of this framework is matched only by the urgency of the problem it addresses. We need a probabilistic, inference-ready, learning-powered nothingess. If you can take this wonderful Nothing framework in that direction, you will address the vacuous heart of information science today, right at its core.
I'd like to use this in my project as a nuget dependency.
System.Threading.Channels:
https://github.com/dotnet/corefx/blob/master/src/System.Threading.Channels/src/System/VoidResult.cs
Other like:
var unitLike1 = new System.ValueTuple();
var unitLike2 = System.Threading.Tasks.Task.CompletedTask;
var unitLike3 = new System.Threading.Tasks.ValueTask();
object unitLike4 = null;
F# unit
// Unit
using Microsoft.FSharp.Core;
using System;
[Serializable]
[CompilationMapping(SourceConstructFlags.ObjectType)]
public sealed class Unit : IComparable
{
internal Unit()
{
((object)this)..ctor();
}
public override int GetHashCode()
{
return 0;
}
public override bool Equals(object obj)
{
if (obj != null)
{
if (!LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric<Unit>(obj))
{
return false;
}
return true;
}
return true;
}
private virtual int System-IComparable-CompareTo(object _obj)
{
return 0;
}
int IComparable.CompareTo(object _obj)
{
//ILSpy generated this explicit interface implementation from .override directive in System-IComparable-CompareTo
return this.System-IComparable-CompareTo(_obj);
}
}
C# void
:
// Void
using System;
using System.Runtime.InteropServices;
/// <summary>Specifies a return value type for a method that does not return a value.</summary>
[Serializable]
[StructLayout(LayoutKind.Sequential, Size = 1)]
[ComVisible(true)]
[__DynamicallyInvokable]
public sealed class Void
{
}
Just a placeholder to remind us not to forget this one - this framework needs documentation, including both a tutorial for beginners and a more in-depth guide for advanced users
I'd love to use this, but since it doesn't implement an interface and relies on a static instance, it's a lot more work to integrate Nothing in my DI framework and mock it out.
Are you actually paula?
I'd like to use this but I'm concerned about the overhead of creating classes.
If Nothing is truly nothing then shouldn't it be removed at compile time? Otherwise it's technically something.
I'm new to "Nothing" and I'm trying to get the hang of this framework. I'm used to navigating big frameworks like Entity Framework. But this one is really baffling me.
First, why do we need it? I mean, we already have "void". Isn't "void" good enough? Or is Nothing like "null"? But then I've never understood the difference between the empty string and "null". And why not just use 0 (32-bit or 64-bit?) as void anyway? JavaScript just has none of these problems. And if I have a list of nothing, is that nothing? It's making my head hurt just to think about that.
Secondly, I don't understand the future evolution path. What's the roadmap here? What can we expect in Nothing 2.0? I'll add a separate issue about this.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.