Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you have some examples of things in here that you think will help you solve current problems?

I'm approaching it from the angle that I don't see how functional programming is at all useful for the kind of gameplay programming that would be done in a "metaverse" or is done in Unreal Engine today. So "it can do functional programming stuff" by itself doesn't cause any excitement. Rather the opposite. There are zero code examples of using it for anything besides abstract math. It executing code out of order seems to serve no purpose besides letting people create undecipherable monstrosities with it.

I'd maybe sum up this presentation as "we took functional programming and tried to make it less unusable by letting you actually mutate state" but I'm still lacking the original motivation of why I'd want to use that in the first place.



Well I don’t build games, so huge lump of salt, but I could benefit from and imagine translating into my work the language’s approach to:

- null safety

- deferred evaluation of expressions with unresolved dependencies

- types as first class values

- the real thing functional programming is about: making it possible to know what value is bound to a thing at any point in a program

The first is valuable for any program, the last is valuable for any program with multiple inputs (so, games, but also basically any human facing program because IO, or really just any program with users and real world interfaces), and types as values is a world of oysters if you like what types afford for development.

Edit: lol I forgot to expand on deferred evaluation, it’s a really good model for distributed users but could also be a good model for highly dynamic applications like one I maintain where there’s a hard constraint on synchronous execution but currently a very lazy model of what needs to be executed.


The approach of using a function to describe a type where success is the identity is a very simple way to implement dependant types


But how does it help me implement a gameplay mechanic for the "metaverse"?


Logic programming and games actually go well together... inform (probably the most important text adventure engine) is notably a logic programming language. And many game engines have moved to an architecture in which game assets are represented in a database, and changes to game state are represented as queries on the database (which is canonically what logical programming does).

For instance this might be super mario... mario moves forward or the gumba moves forward or mario hits the gumba and mario enters death animation and the gumba stops or mario hits the gumba from above and the gumba enters death animation or mario hits a coin box and a his coins increase and mario stops and the box enters coin animation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: