Grigory Shepelev on Nostr: npub1yyv9w…x4hz6 I appreciate your experience and work, but schemas (checking data ...
npub1yyv9w2t97ah30cx4u9sqf2vfch5h2n2ht6u049l3ut67du4tetmqhx4hz6 (npub1yyv…4hz6) I appreciate your experience and work, but schemas (checking data with some patterns in the runtime) and types (static memory cells that checked in compile time*) are 2 very different approaches.
And the 2nd on is much less flexible cos it allows not only to check if the data is "string" but also any regexp pattern or it's length etc.
In fact the project I work on my current job uses Joi schemas (joi.dev). That is almost same thing as clojure's malli/spec.
*crude description
Published at
2023-08-22 09:30:02Event JSON
{
"id": "0304c8f3c6e343093695c7bae39926d88f75c851392c10aa55e01d08e881182b",
"pubkey": "80f73da41776b5de90409bfed6064903e4e7a64740ca4400f5e5437f87d60e20",
"created_at": 1692696602,
"kind": 1,
"tags": [
[
"p",
"2118572965f76f17e0d5e16004a989c5e9754d575eb8fa97f1e2f5e6f2abcaf6",
"wss://relay.mostr.pub"
],
[
"p",
"89e7abd98d773215da66d9668d649260cba879c668c0e0931faec4cf93c673ea",
"wss://relay.mostr.pub"
],
[
"e",
"c786a0ad6725225d64781608e6c2207fac15b6907633b0bc9840cf2940161f13",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://fosstodon.org/users/shegeley/statuses/110932564525565233",
"activitypub"
]
],
"content": "nostr:npub1yyv9w2t97ah30cx4u9sqf2vfch5h2n2ht6u049l3ut67du4tetmqhx4hz6 I appreciate your experience and work, but schemas (checking data with some patterns in the runtime) and types (static memory cells that checked in compile time*) are 2 very different approaches. \n\nAnd the 2nd on is much less flexible cos it allows not only to check if the data is \"string\" but also any regexp pattern or it's length etc. \n\nIn fact the project I work on my current job uses Joi schemas (joi.dev). That is almost same thing as clojure's malli/spec. \n\n*crude description",
"sig": "fcb28f4946c8955b770d221e43bd18b5ceb0e996750dd61ffc99dc1e19514846fa9607a957b3e6bf0195b0066a21fb0e6155c48d9499112679709217441f295b"
}