Docs: VB compiler switch usage

Created on 21 Feb 2018  路  17Comments  路  Source: dotnet/docs

Recently we found out that our C# compiler options articles were not using a consistent switch for those pages. Sometimes it would use - and sometimes it would use /, since both are accepted.

We asked the C# community and the overwhelming majority voted in issue #4072 to use - for the compiler switch. So in C# topics and multi-language topics we're adopting - for the switch.

Now, we want to ask the VB community what is your preference. I personally don't have a preference for this one.

Respond 馃憤 to keep / for compiler switches, 馃憥 if you'd prefer to change it to '-'.

/cc @KathleenDollard

Area - Visual Basic Guide P2

Most helpful comment

The overwhelming majority voted for dash in issue #4072. And it seems that's the preference here too.

And thanks for the feedback regarding the issue on the dotnet/vblang repo. It made my day @ericmutta! I hope to you see you more around here. 馃槃

All 17 comments

馃憥(-)

I don't recall ever calling the VB compiler directly (or needing to look at the compiler arguments very often), so I'm not too concerned which one is used, but I think this comment from #4072 makes a compelling argument for -:

My preference is to use '-' throughout the docs to avoid confusion with a path separator.

That's definitely a good idea. Plus, consistency between the VB and C# docs would be good.

And from the same comment:

The index pages should mention that both are supported.

Agreed, if for no other reason, because - is more portable than / for the most part

馃憥(-)

Go with - as / is consistent with C#, and doesn't need to remember if it needs escaping or not.

I like consistency, so it's awesome to get the feedback from everyone! Thanks for the comments so far.

I prefer / because that's what I'm most used to on Windows and - doesn't work on all other Windows command-line programs, e.g. dir -s -b or dir -ogen doesn't work, rmdir -q -s doesn't work. So, the question isn't consistency but with what to be consistent. If the majority of docs readers are on Windows where none of the basic file i/o commands work with - then it's going to be an inconsistent experience for them.

But, I realize that on other OSes - is the norm and / can be a path character so I'm I'll understand if - wins out. And any docs for .NET core, e.g. dotnet build -help will use - so using / is not a great experience for them. This is a really crappy spot to be in :(

Like @AnthonyDGreen, I also prefer the / since it is more consistent with command line switches used in the Windows operating system. My question though is, can't the compiler support both even if the docs use just one or three other?

Then again I must admit I don't directly invoke the compiler in everyday situations so I don't really mind what the final decision is as long as it's documented well enough.

@franzalex yes the compiler already supports both. This issue is just about what the docs should use for consistency.

I don't use the VB compiler switches often (can't remember the last time), but al the command line experiences I have from the past years use a '-', like EF Code First and NuGet... For me a / feels very unnatural.

And as @reduckted already mentioned: it's a documentation thing, the compiler supports already both.

In the years since 2001 when I first tried VB.NET I can't remember a single time I ever invoked the compiler on the command line! However if I ever had to, I would use / since that is what I use when on the Windows command line (e.g dir /s to get a full directory listing).

I have also started using Ubuntu for my back-ends lately, but that is such a foreign environment, my brain does a complete context switch and I never try to use the / anymore (and even on the bash shell, I can never remember if its one dash or two).

If the compiler's accept both, then I guess the answer for what you use in the docs is: whatever you were using up to this point (I don't imagine it's a fun exercise to review all the docs and make a change!)

@ericmutta the C# docs were using a mix of both so we wanted to be consistent and started the discussion. With that, the question came up of what we wanted to do for VB. With Markdown. it's not hard to change them.

@mairaw the C# ...With Markdown. it's not hard to change them.

I see, well in that case my vote is to use whatever the majority wanted on the C# side. Since many of us don't ever touch the command line compiler, it won't really matter, but the consistency between languages will be a bonus for the people who deal with both (e.g I am writing a lot of C# now because Xamarin requires it...and it's just awesome to find consistency between the languages, e.g interpolated strings use the same syntax).

PS: great job introducing yourself and the other members of the content team in #265. Putting names and faces to this stuff really does encourage one to contribute :+1:

The overwhelming majority voted for dash in issue #4072. And it seems that's the preference here too.

And thanks for the feedback regarding the issue on the dotnet/vblang repo. It made my day @ericmutta! I hope to you see you more around here. 馃槃

@rpetrusha assigned this to you, removed up-for-grabs label and set it to the current milestone given you're working on a PR already.

@AnthonyDGreen said basically what I would have said...

We've opened PR #4632 to change documentation for Visual Basic compiler switches to use - rather than /, for those who would like to review it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

skylerberg picture skylerberg  路  3Comments

stjepan picture stjepan  路  3Comments

mekomlusa picture mekomlusa  路  3Comments

gmatv picture gmatv  路  3Comments

LJ9999 picture LJ9999  路  3Comments