Re: [Vala] vala libgda LINQ



On 04/12/2013 16:52, Daniel Espinosa wrote:

Vala has provide nice/sexy syntax for GObject/C programing. Have added lot of new features, witch have been possible to write in C but with lot of lines of code. I love Vala because allows me to be more productive, even Genie allows more simplification on Vala's syntax.

I think that former syntax are more productive and easy to read than the last. Could allow to work with-in Vala's code with lot of data from a DataBase or any other data source. GdaData objects and interfaces allows to access that data using just GObjects and Vala code, abstracting most of internal operations and mapping to properties and methods, and allow to use Gee collections to make more easy to access to data using by code; but could reach a next level by adding some syntax support on Vala for SQL like queries.

I know that adding syntax support may is not easy or is far from Vala principles.

Then I would like to see a way to allows Vala compiler with a mechanism of PLUG-INS for syntax support. Then GdaData could add its own plug-in for SQL syntax when it is installed.

The above allows not to distract Vala from its principles, but allows to others add syntax for specific task that makes more easy/productive and clear way to do the same.

Less code and clear syntax, allows more productive less errors.
Plugins are planned, but not for changing the syntax. Plugins will be able to transform the ast into other ast, but neither semantics nor syntax are allowed to change.

Consider this alternative, doable with such plugins:
select(Class.foo, Class.bar).from(collection).where(equal(some_field, "some value")).

Collection may be anything from an array to a gee collection to anything. The plugin in this case can generate the relevant code by doing the necessary magic, and it has all the information about the collection from the ast.

However, such plugins will not be there anytime soon, there's first a huge experimental branch to be merged (yet to be completed).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]