Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bounded type parameters in Vala

Tags:

vala

In Java you can have something like this

class MyClass<E extends A> { ...

In C#

class MyClass<E> where E : A { ...

Anything similar in Vala?

like image 264
Naheel Avatar asked Mar 22 '26 00:03

Naheel


1 Answers

No, not supported in Vala.

This is all available keywords in the language Vala, and the "where" specifier is not there.

Here is a filled bug to ask for this feature.

I've had need for constraints as well, in the and I had to change my design to use a normal generic type.

like image 99
Felipe Lavratti Avatar answered Mar 25 '26 09:03

Felipe Lavratti