Re:Type system of Fortnite's Verse language
by illiarian on Thursday March 30, 2023 @11:21AM
(#35374081)
Just because functional languages have immutable data locally doesn't make them any more suitable for handling data across "100 remote clients simultaneously". You need a bunch of stuff on top to make it work. Even reacting to state changes on a remote client is a problem in itself, you you can't wave it away with "but immutability".
> but I'm still not totally clear on how conditionals work in Verse
To be honest, there's nothing clear about Verse at all. It promises to be everything for everybody, but is extremely light on details.
Re:Type system of Fortnite's Verse language
by Weebs on Thursday March 30, 2023 @02:46PM
(#35377244)
Yeah I'm not saying immutability solves the problem, I am saying that having good support for immutability is helpful for building those synchronization and rollback systems. If I thought immutability was all you needed I wouldn't be bringing up the effects system & pointing out how current languages still fall short in my own experience.
It's a difficult problem to put it lightly, so as someone that dislikes new languages for only one tool, I consider this one of the cases where the benefits can outweigh the negatives
Interestingly this language has a concept of effect types that as far as I know has been only present in mostly research projects & a few general purpose languages like PureScript. Leaning on that to eliminate certain classes of bug from taking up your mental resources seems promising. Even in an ML I found myself wanting stricter guarantees about execution available while writing a PvP shooter for only a few clients, imagine 100! You can create DSLs to help with these things, but at that point I think it's asking to much for a beginner to learn both a new language and well enough to understand how DSLs can let you describe things with different semantics than you've already learned
I noticed they seem to have no mention of tagged enums/algebraic data types, which is unusual for a typed functional language, but there is an Optional type at least. I wonder if it has to do with the differences of their conditionals, which sound like they have far reaching implications, but I'm still not totally clear on how conditionals work in Verse