Hacker News new | ask | show | jobs
by Weebs 1171 days ago
For those wondering why they've created yet another language, keep this in mind: Fortnite content is running code on possibly 100 remote clients simultaneously, and code often has state that needs to be synchronized across clients, which can often require rolling back the system to a specific previous state (which is a context FP languages tend to shine, because of the first class support for working with immutable data giving you easy snapshots of a system and resetting state)

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

1 comments

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.

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.