Love it. I have no complaints.
I LOVE HIM!!!
Love it. I have no complaints.
I LOVE HIM!!!
Jolly gosh, batman. Looks like we have a new mascot to play with. Isnāt he the cutest?
ā¦ Iām batman.
Adorable mascot, despite what @RickAstll3y says. Itās really great to see the language being pushed forward to newer and better heights, I hope the whole team knows we all appreciate it greatly!
Really need native code gen for client. Iām always doing intensive computational work with EditableImages and processing all those pixels with native code gen gives more than double the performance!
There were talks about this quite a bit here and in the OSS discord. TLDR; this isnāt something Luau is looking to implement anytime soon.
This isnāt something which feels very āLuau-likeā. Luauās type system excels at being dead simple to grasp, while also allowing for gradually typed code. I really do like how Luau types donāt overshadow the underlying code logic, which types in TypeScript often do. If youāre looking to have some of the specific features like type constraints, those are currently being worked on as part of a new type solver.
Here are some RFCs being worked on (they donāt currently exist in stable Luau) that you might find interesting:
As for type-constraints, there was a proposal made and the team definitely wants to implement them at some point.
Iām trying to create a recursive tree of functions that gets called depending on the context of the functions before it. The generic is for a stored variable that should be passed when calling the function.
I understand this is a case of Recursive type being used with different parameters, but Iām not sure why thatās an issue. I understand the most typical case of recursive calls maintains the same type parameters, but I donāt see why in strict mode all of them have to.
Edit - My case is a variant of BehaviorTree / FiniteStateMachine - whereas normally you could
modify it using some sort of format:
local function doAction(args) --Prepare Modified Action
return function(blackboard)
--On Action Call
end
end
and this would remove the need for the generic altogether, Iām also passing an internal blackboard sort of structure and had been hoping to reduce the number of function calls / make creating actions simpler by making it:
local function doAction(blackboard, args)
-- On Action Call
end
Since Iām going to be making a large number of actions.
The problem weāre trying to avoid is one where the full expansion of a type could potentially be infinite. For example:
type Weird<a> = { data: a, children: Weird<{a}> }
You can read a more detailed description here: rfcs/docs/recursive-type-restriction.md at master Ā· luau-lang/rfcs Ā· GitHub
Weād like to lift this restriction someday, but itās not trivial to do.