Announcement

Collapse
No announcement yet.

[CLOSED] [Bridge2#1] [2.0] Support for C# 6 "nameof"

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [Bridge2#1] [2.0] Support for C# 6 "nameof"

    I'm fairly sure that I've read somewhere (a long time ago) that C# 6 syntax is not going to be a priority for Bridge v1, since v2 will change how the source code is interpreted and use the C#-6-aware Roslyn, but I also thought that it might be worth a try requesting one particular syntax improvement - the worst that can happen is that you say no!

    One of my favourite things about the C# 6 syntax is nameof, being able to use

    if (name == null)
        throw new ArgumentNullException(nameof(name));
    instead of

    if (name == null)
        throw new ArgumentNullException("name");
    I have code snippets that I use for these constructs because I use them so frequently. When I installed VS2015, I updated the snippet to use nameof - but, of course, this is not compatible with Bridge. So I have to either change my snippet back to the old way, so that I can use it with Bridge, or I keep the snippet intact and remember to edit the result or to write the if-null-then-throw out by hand each time when I'm writing code for Bridge.

    For a while I was considering sticking to VS 2013 for my Bridge-writing so that I wouldn't run into this but I've been writing a Roslyn Analyser to work with a new library that I've written for Bridge, so 2013 is no longer an option.

    I am aware that this is quite a personal (and selfish) feature request and I'll not be too disappointed if you consider it to be too unimportant (although Q2 2016 for Bridge v2 feels so far away......) to spend time on. But, as I said, I didn't think that it would hurt to ask!

    #2
    Hi ProductiveRage,

    The limitation with Bridge1 is NRefactory. It just doesn't support parsing C# 6 syntax.

    Bridge2 is built on Roslyn, so this syntax is fully supported.

    We're doing our best to release Bridge2 as soon as possible. There's still a lot of work to be done, but we're making progress.

    We're just trying to balance ongoing Bridge1 support with new Bridge2 development.
    Last edited by geoffrey.mcgill; 2015-12-17 @ 04:15 AM.

    Comment


      #3
      Thanks for the update, much appreciated.

      Comment

      Working...
      X