[Ironruby-core] Lowercase classname

Jimmy Schementi jimmy at schementi.com
Fri Nov 19 11:00:43 EST 2010


Not sure I follow. IronRuby does support this via DotNetClassName =
Object.const_get("lower_case_dotnet_class_name"), so you don't need to
change your code. This is an issue because of Ruby itself; classes are
required to be Ruby constants, which syntactically can only start with an
upper-case letter. Since IronRuby is syntactically equivalent to Ruby, we
will not remove this rule. Instead, we either suggest changing your C# code,
or if you can't, use const_get. WRT your IronPython comment, it doesn't have
this issue because the Python language doesn't enforce a naming scheme on
type names.


On Fri, Nov 19, 2010 at 10:48 AM, andrew Wilson <a.wilson82 at gmail.com>wrote:

> This is only an acceptable solution if the user has the source code and is
> capable of modifying it.  For how I test things with IronRuby, this isn't
> always possible.  Seems odd to me that one of the most flexible language I
> know of can't read/integrate with another language due to code not following
> a rigid structure.
> Doesn't IronPython allow for this?  I was fairly sure I could import
> non-standard .Net convention based code into it.
> -Andrew
> On Fri, Nov 19, 2010 at 2:41 PM, Shay Friedman <shay.friedman at gmail.com
> >wrote:
> > Look here:
> >
> http://www.ironshay.com/post/Working-with-NET-Lowercase-Namespaces-and-Classes-in-IronRuby.aspx
> > <
> http://www.ironshay.com/post/Working-with-NET-Lowercase-Namespaces-and-Classes-in-IronRuby.aspx
> >
> > Shay.
> >
> Excellent solution. I mean, really, all the C# classes should start with an
> uppercase letter, thats basically a standard, therefore this should be the
> only solution and I don't see no need to actually hack this otherwise into
> IronRuby.
> --
> “If I had six hours to chop down a tree, I’d spend the first four of them
> sharpening my axe”.
> -Abraham Lincoln
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20101119/2d914eb6/attachment.html>

More information about the Ironruby-core mailing list