Answer the question
In order to leave comments, you need to log in
What is the main disadvantage of the V language?
Offhand I can name:
- Numerous bugs, which can be solved and does not make the language dead.
- lack of libraries, which again is a matter of time and does not make the language dead.
I do not consider the absence of a community, because. the same Rust also does not, but this does not prevent him from progressing.
But the declared pluses: simplicity, speed of compilation and minimalism of ready-made applications - which is very important in our time, make the language seem to be a "killer" of the rest.
But something does not believe in such magic. Let's figure it out. What's the catch? It can not be that no one has guessed before the acceleration of hundreds of times ? What is the main "flaw" or "minus" of the language, removing which we get the same <any old language> as before?
The author seems to be a reasonable person and logically justifies the need for a language in comparison with his predecessors, including benchmarks. According to well-known practices, he takes the best , in his opinion, from the existing ones. And I understand that we live in an age when IT is developing very rapidly. And also I understand the problem of software bloated to the brink of reasonable size and slowness. But even with this in mind, it is hard to believe in a revolution. Looks more like a soap bubble. Although I don't have enough arguments against it.
The author proposes V as a replacement for such modern compiled languages as C++ , Rust , Go .
Answer the question
In order to leave comments, you need to log in
Actually, you answered your own question:
numerous bugs
- no libraries
no community
Well, all the magic (speed, minimalism and the rest) is just due to the lack of libraries. As soon as the GUI is connected, either to work with the system, backward compatibility for old axes and this whole harness, without which you can only saw console tools, both the compilation time and the size of the binary will increase immediately.
Although it is not completely clear whether, without marketing, a new PL can take off on objective advantages alone.
In my opinion, when it will be with generics (if ever it will be), then the subject will quickly become unnecessary.
Well, it really looks like some kind of Go with a slightly modified syntax:
// Please share your thoughts, suggestions, questions, etc here:
// https://github.com/vlang-io/V/issues/3
// I'm very interested in your feedback.
module main
struct User { /* ... */ }
struct Post { /* ... */ }
struct DB { /* ... */ }
struct Repo <T> {
db DB
}
// Generic code is notoriously verbose. To reduce clutter, V doesn't require you
// to add `<T>` every time, since it already knows that Repo is a generic type.
fn new_repo<T>(db DB) Repo {
return Repo<T>{db: db}
}
// This is a generic function. V will generate it for every type it's used with.
fn (r Repo) find_by_id(id int) T? { // `?` means the function returns an optional
table_name := T.name // in this example getting the name of the type gives us the table name
return r.db.query_one<T>('select * from $table_name where id = ?', id)
}
fn main() {
db := new_db()
users_repo := new_repo<User>(db)
// I'm also considering passing the type as an argument
// users_repo := new_repo(User, db)
posts_repo := new_repo<Post>(db)
user := users_repo.find_by_id(1) or {
eprintln('User not found')
return
}
post := posts_repo.find_by_id(1) or {
eprintln('Post not found')
return
}
}
There are two common minuses in 90% of programming languages, which do not allow them to develop quickly.
1. There is no large company behind that is ready to invest in marketing and development.
2. There is no clearly stated niche. For what purposes and to whom will it be useful? The universality of languages has not worked for a long time.
And in this language, in general, some kind of artificial hype rises. Neither the source code nor the compiler binaries are yet in the public domain, but on github a dozen examples scored 2000 stars.
And at the moment, the only positioning I see on the site is Simple, fast, safe language created for developing Volt, soon available for everyone.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question