Comment

Comment by dgb23

I have to say the API seems to be very pleasant and simple at a glance. Kudos to the author!

> Being able to use Rust functions directly as systems might feel like magic, but I promise it's not! You may have noticed that we do this when registering systems in our App (...)

> (...) This works because we implement the IntoQuerySystem trait for all functions that match a certain set of function signatures.

This pattern is a great example of how Rust achieves to be both very ergonomic or dynamic (in the sense of expressiveness) and type safe at the same time.

parent dgb23 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton