V: .v file extension is Verilog

Created on 23 Feb 2019  Â·  20Comments  Â·  Source: vlang/v

Hi, this looks like a cool language. However using .v is not a wise choice, as this has been used for the Verilog language for the past 25 years.

https://fileinfo.com/extension/v

Most helpful comment

@calebwin I like that. Just like .cpp/.cc in C++.

All 20 comments

It also happens to be the same extension used by Coq https://github.com/coq/coq

I was looking to add this into https://github.com/boyter/scc/ and realized the extension is shared. Perhaps something such as vlang? Not sure what to do here. You can of course use v if you choose but it is going to be an issue for existing tools.

If vlang is too long we could also consider vl. It's not indexed by fileinfo and doesn't appear to be in soc.

Why wasn't Verilog .vl like how Prolog is .pl? 🤔

.vl could be an option though.

I much prefer the simplicity of .v. I doubt many people will encounter conflicts between the two file types. Just my two cents.

Agree with @xenophilicibex

At this point conflicts with names and extensions are unavoidable. Modern tools are smart to distinguish between different languages.

Almost every extension you search for is used by multiple programs/languages.

For example, Github uses Linguist (https://github.com/github/linguist) to do its syntax highlighting.

Here is Linguist's programming language dictionary: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L5157

Verilog is assigned the .v extension.

This is why your example source code on Github has partial highlighting: https://github.com/vlang-io/V/blob/master/examples/generic_repository.v

I'd suggest a different extension (.vl or anything else).

Linguist supports languages with the same extension.

On Feb 24, 2019, at 20:28, Payton Quackenbush notifications@github.com wrote:

For example, Github uses Linguist (https://github.com/github/linguist https://github.com/github/linguist) to do its syntax highlighting.

Here is Linguist's programming language dictionary: https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L5157 https://github.com/github/linguist/blob/master/lib/linguist/languages.yml#L5157
Verilog is assigned the .v extension.

This is why your example source code on Github has partial highlighting: https://github.com/vlang-io/V/blob/master/examples/generic_repository.v https://github.com/vlang-io/V/blob/master/examples/generic_repository.v
I'd suggest a different extension (.vl or anything else).

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/vlang-io/V/issues/6#issuecomment-466808283, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp_fDdjJShIwutPvuomP_O1uUwAh-08ks5vQufjgaJpZM4bNyIy.

Modern tools are smart to distinguish between different languages.

Just curious - how is this typically done? simple heuristics?

From a discussion I read on Atom’s forums they do things like read the first line, and usually that covers 90% of the cases.

On Feb 25, 2019, at 17:37, Caleb Winston notifications@github.com wrote:

Modern tools are smart to distinguish between different languages.

Just curious - how is this typically done? simple heuristics?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/vlang-io/V/issues/6#issuecomment-467082034, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp_fFSihP8AGuAfmHv4qXizWvq-vpzAks5vRBFmgaJpZM4bNyIy.

By the way @boyter what an amazing tool! I've been using cloc forever, and scc is 30 times faster!

@medvednikov Thank you. A lot of work went into making it fast and accurate. The next release should have support for V as well once I finish off a few things, possibly in a day or two.

@medvednikov Have included V support into scc. I based it on what I have seen in the examples, so it may need some tweaks but should report the files correctly now I hope.

Nice, thanks :)

On Feb 27, 2019, at 23:38, Ben Boyter notifications@github.com wrote:

@medvednikov https://github.com/medvednikov Have included V support into scc. I based it on what I have seen in the examples, so it may need some tweaks but should report the files correctly now I hope.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/vlang-io/V/issues/6#issuecomment-468059507, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp_fFLtlWa34Pp40kNuIi_fhkG4rqRjks5vRwj5gaJpZM4bNyIy.

The name and the extension are going to stay the same.

I know this is closed; my two cents would be to choose a trigram that is infrequently used. .vvc comes to mind as a good candidate; vvc.org is even available (and vvc.com is just a parked page), and as far as I can tell there is no current use of the file extension. Going with a four-letter name, especially one that is not pronounceable, would move even further out of the collision range.

Having a mostly unique name is attractive because it makes searching easier and less ambiguous.

vvc.org http://vvc.org/ is not available, .v is not a frequently used extension.

On 6 Mar 2019, at 15:49, Andrew Laucius notifications@github.com wrote:

I know this is closed; my two cents would be to choose a trigram that is infrequently used. .vvc comes to mind as a good candidate; vvc.org is even available (and vvc.com is just a parked page), and as far as I can tell there is no current use of the file extension. Going with a four-letter name, especially one that is not pronounceable, would move even further out of the collision range.

Having a mostly unique name is attractive because it makes searching easier and less ambiguous.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/vlang-io/V/issues/6#issuecomment-470129816, or mute the thread https://github.com/notifications/unsubscribe-auth/AAp_fKhxZEDOMuvPOXZv4IrTXAfQ3R4mks5vT9WEgaJpZM4bNyIy.

I think "Vee" is a, uhm, pretty good name. We can keep the pronunciation, and the file extension ".vee" is unique :)

I was about to raise an issue with the same topic. Using .v as an extension for this language is just inviting confusion with Verilog. There are plenty of other options here but for some reason it's been decided to use the same extension as a well established language just because it's simple.

I suggest changing it while it still can be changed.

Couldn't there be 2 file extensions - like .v and .vlang or something like that?

That way people could generally use .v if they prefer the extension's simplicity or .vlang if whatever software they're using can only recognize .v as Verilog but does have .vlang as the extension for V.

@calebwin I like that. Just like .cpp/.cc in C++.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vtereshkov picture vtereshkov  Â·  3Comments

radare picture radare  Â·  3Comments

choleraehyq picture choleraehyq  Â·  3Comments

penguindark picture penguindark  Â·  3Comments

XVilka picture XVilka  Â·  3Comments