Chakib Ouhajjou
Chakib Ouhajjou
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
import "list"

#goodList: {
l: [int, ..._] & list.MinItems(2)
lastIsString: l[len(l) - 1] & string
}

myList: #goodList & {
l: [1, true, false, "hello"]
}
import "list"

#goodList: {
l: [int, ..._] & list.MinItems(2)
lastIsString: l[len(l) - 1] & string
}

myList: #goodList & {
l: [1, true, false, "hello"]
}
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I guess it's the workaround for Variadic lists.
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
it's kindof a lowcode mindset
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
so that I can 'show' code to business people
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I do build apps not libs. so I tend to go with simple designs.
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
I'am a proponent of least design principle
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
do people use this stuff ?
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
wow !
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
so you what a first and a last element and some stuff in between ?
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
// A is an open list with 3 predefined elements. // Any additional elements must be ints. A: [1, 2, 3, ...int]
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
yes
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
can you please provide the simplest example from that code ?
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
let me convert it
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
No description
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
it's also order independent
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
cuelang is not turing complete. so it's a specialized tool.
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
you can merge a string and a value to a value if they dont conflict
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
you can merge any two type sets.
98 replies
Aarktype
Created by Bjorno on 8/27/2024 in #questions
Extending types similar to an interface
since everyting is a value in cuelang
98 replies