Hacker News new | ask | show | jobs
by Rochus 1527 days ago
Maybe the author just likes to implement programming languages and sets high goals. All those who have experience with this know that it is a lot of work. Apparently, the author has been working on this for many years and has achieved a lot. I recently bought the Packt book; what is not clear to me at the moment is what are the specific innovations over the other already established languages. Thus, it would be helpful if on the main page of the language there was an essay on why the author thinks there is a need for a new language, and what the specific advantages are with respect to concrete features of the other languages.
2 comments

> sets high goals

The problem is that in the initial releases the "high goals" were listed as "features" of the language, not as planed improvements of the initial implementation. So even now when I read a list like in the article, I'm not sure which are already implemented and which are just wishes, but after the initial bad impression I'm not bother to check.

Problem? Is the communication not up to the author? And shouldn't people rather help out than just make demands on an open source project?
That is absurd. He's not saying "I have an idea, and with a bit of help we might reach extraordinary numbers", he claims "better faster leaner than everybody else".
Nice to see he's kept his word and following through as is the community. Really great and lovable group of folks. Sometimes there are cultural differentials, but everyone is really great and with a primary and essentially only rule of "be nice" - I think it's a breath of fresh air in this screwed up time.
It's not uncommon and no bad practice at all to fully specify a language before it is fully implemented. There were a couple of languages where the compiler took even many years to come into existence after the language was published, or was never finished. Other people - like e.g. me - develop the language specification and compiler in parallel. Just different ways to look at it.
How is it related to spec'ing the language. It's just fuzzy use of terms to appear extraordinary. That's all. Btw he still didn't answer my simple question, meanwhile everybody is commenting saying how nice the community is, how people should help instead of criticizing and deflecting the actual issue people had with the project.
> How is it related to spec'ing the language

You wrote a bit further up: "The problem is that in the initial releases the "high goals" were listed as "features" of the language". The "features" you mention are obviously the specification. Have e.g. a look at how long they specified Algol 68 and when finally a compiler appeared; CPL is yet another good example; actually at that time Wirth was one of the few who delivered a compiler simultaneously with the language specification.

I don't have time to help every single open source project that makes bold claims. I also don't demand anything, I just moved V to my ignored list. It may be unfair, and I may take a look in a few years again if there are enough solid news about V floating around.
Apparently you don't ignore it.
All claims on the website are valid with latest V.
Really?

- No null

Then what is `voidptr(0)`?

- No global variables

https://github.com/vlang/v/blob/master/doc/docs.md#global-va...

At least add "by default" to the web site.

- No undefined values

Which is done by initializing all values to 0. Probably not a good idea to do that for references though. (See also "no null values")

- No undefined behavior

`*voidptr(0)` is accepted by the compiler. Unsigned integer overflow is accepted by the compiler and UB in the generated C. How can V generate C code free of UB when it can't even generate C code that compiles all the time?

- Pure functions by default

Excluding I/O, one of the biggest sources of impurity, from your definition of pure is useless.

- Generics

You don't actually have generics, you have templates. Kind of ironic since Go has actually added generics before V has managed to get a 0.3 release out. The distinction is this: with generics the compiler is able to validate that the generic code type checks prior to substitution/monomorphization. With templated code, it's not possible to perform type checking until the concrete types have been instantiated. V implements templates with all the drawbacks including code bloat and inflated compile times that comes with it.

Besides the obvious trolling, much of this is your interpretation and what you want the developers of Vlang to say instead. Let's keep in mind that others can have different interpretations, opinions, or things they like to nitpick about too. The developers of Vlang aren't obligated to you or me in any way, so are entitled to type their perspectives on their website.

The real deal are the many users, supporters, and contributors of Vlang. Where on GitHub (which is easy to check), it has more than many other newer languages (in various cases, more support than a couple of newer languages combined). Those people are the ones that count, who are using and improving the language daily.

"You can't put the genie back in the bottle", Vlang is firmly on the road to success and more popularity, despite its detractors and angry competitors.

> what is not clear to me at the moment is what are the specific innovations over the other already established languages.

I'll make it more clear on the website.

There's already a comparison to Go, the language V is most similar to:

https://vlang.io/compare#go

Quite a lot of improvements.

V is basically about having the performance of C, the ease of use of Python, the simplicity of Go.

Thanks for the link; that's going in the direction I was looking for. So could one say that V is essentially the Go the author would have wanted, and the new language is justified by the "~20%" difference, and an independent development is necessary due to the slow pace at which Go is evolving? So that would be a similar motivation as Nim versus Python, or Oberon+ versus Oberon.

The feature differences in list form are helpful; but the priorities and motivation for individual features would also be interesting; e.g. why is "variable shadowing" bad and why is the V approach better, and how can smaller runtime and binaries smaller by a factor of 100 be achieved with a feature set that is at least 80% the same as Go? Does this really have to do with the language definition, or rather with the implementation?

I created V because Go didn't work nicely with C for my project.

So just that would be enough for me to use V.

Variable shadowing makes code more bug prone and confusing.

As for the size: V uses system's official API (libc), including networking. Go has their own libs that have to be statically linked in to the binary.