A very important element of Rye language is it's Validation dialect.
It's related to idea of having a very dynamic, but at the same time also more "certain", if I dare not say safer language.
It makes checking for input, or expected data, quicker and cleaner. It also reduces and systematizes a lot of otherwise ad-hoc and ugly code, that is usually spread out around your "business logic" code, making it less visible, but is mostly even not written.
Another part of equation is the Conversion dialect. I think a lot of code is just there for mangling and preparing data, or converting it from one to another format, renaming fields between them. Conversion dialect tries to make this more compact and less ad-hoc.
Below is a short demo from the REPL.
Both validation and conversion dialects can be invoked directly with a function, but they are a crucial part of other mechanisms in Rye. Rye has "kinds", which on creation by default invoke validation and conversion when you convert from one kind to another if there is converter available. More on this subject later.
Follow development on github.
Komentarji
Objavite komentar