[Ironruby-core] Implementation plan and a string question...

John Messerly jomes at microsoft.com
Fri Nov 9 20:53:10 EST 2007

John Lam:

> Lee Culver:
> > Lastly, I see the following in the code base: /*!*/.  For example:
> >
> >         public MutableString/*!*/ Append(string/*!*/ str, int
> > startIndex, int charCount) {
> >
> These are the Spec# annotations. There is a wiki with some info on
> Spec#:
> http://channel9.msdn.com/wiki/default.aspx/SpecSharp.HomePage
> http://channel9.msdn.com/wiki/default.aspx/SpecSharp.SpecSharpAttribute
> s
> Research papers are available on
> http://research.microsoft.com/specsharp.

And, in particular, the /*!*/ means "should never be null". Common things that can't be null are CodeContext arguments, and the "self" argument in most library methods (however if you're implementing a Module, self can be null, e.g. class NilClass; include MyModule; end; nil.my_module_method)

The /*!*/ is only processed by Spec#, and should not be confused with the [NotNull] attribute that you can use to tell the DLR MethodBinder that null isn't allowed for that argument.

- John

More information about the Ironruby-core mailing list