Content deleted Content added
WikiProject assessment |
→A new Vala article is needed!: new section |
||
Line 130:
What's the origin of the name "Vala"? I can think of several candidates... [[User:Arny|Arny]] ([[User talk:Arny|talk]]) 00:26, 2 April 2012 (UTC)
== A new Vala article is needed! ==
I'm sorry for such drastic petition, but a programming language is characterized mainly by it's syntax and semantics.
Not by examples of how to code the classic Hello World! in different styles.
The object oriented example is very ill constructed,
the line:
<code>
stdout.printf("hello world!\n");
</code>
means that <code>stdout</code>, which is an instance of the streams class, which is capable to process the <code>printf("hello world!\n")</code> message.
It is too artificial to embed it in a class called sample, as was done in the article.
I came to this article trying to understand a free software source which includes modules with the .vala extension.
But this article says no substantial thing about such language.
What is it's advantage compared with plain C or C++, if I only see some complicated examples.
The article could start with an informal, or should I said semi-formal description of Vala syntax, maybe comparing it with C and C++. From which it seems to be inspired.
Then the formal syntax rules of the language (in BNF or similar) or at least a pointer to the official definition.
Then give some important semantic features, like differences in meaning of statements with the same syntax in C or C++ and Vala.
I do not expect a formal (operational) semantics, for vala, as the vast of those new languages are not developed on such formal basis, but as variants or little improvements of other languages, like C/C++.
Neither I do expect from it to include all the semantics of the language in an encyclopedia article, but some important features at least.
The present article mentions the capability to write anonymous functions, which seems interesting.
I may be developed saying for example:
Why is important to have anonymous functions? How are they written? Are they really useful? I can define them, but can I generate them?
In plain ANSI C one can use function pointers, but one can not create functions on the fly, (technically speaking: it is not a higher order language). There are some forms to overload functions, and that is why it is an interesting feature. Of course overloading methods is more natural in OO languages like C++. Can you say something like that in the Vala article?
How about recursion, iteration oriented languages, are not good to implement recursive functions, because as part of semantics, each time a function is called information to return is stored in a stack (see about the heap) which may be too small to be useful in practice. But self calling functions can be transformed in several ways to avoid such problem. Can you say something about this issue in Vala?
I hope that I have been clear with the idea of how an article like this about a programming language Vala, may be structured.
|