- "atoms" (e.g. single items like bool, u32, f32)
- "composites" (e.g. enums, structs, arrays)
is the unit type (`()`), which is not serialized to the wire:
- An "atom" with zero wire size?
- A "composite" consisting of zero children?
- "atoms" (e.g. single items like bool, u32, f32)
- "composites" (e.g. enums, structs, arrays)
is the unit type (`()`), which is not serialized to the wire:
- An "atom" with zero wire size?
- A "composite" consisting of zero children?
I think there are features that could be added to Rust that would allow for more easily reusing the machinery around `Option` and `Result` for custom enums.
But also, code duplication is not the end of the world.
pub type TimeoutOutcome
Ok(T) = Some(T),
Timeout = None,
};
would kick ass if it meant TimeoutOutcome has all the Option impls but was a discrete type and didn’t unify with Option like the keyword currently does
Here's a good example from Zed's Cloud codebase:
```
enum TimeoutOutcome<T> {
Ok(T),
Timeout,
}
```
So much clearer to have `TimeoutOutcome<T>` as a return type than `Option<T>`.
I think there are features that could be added to Rust that would allow for more easily reusing the machinery around `Option` and `Result` for custom enums.
But also, code duplication is not the end of the world.
Create TypeScript declaration types from your PHP models, enums, and other cast classes
🔗 https://github.com/abetwothree/laravel-ts-publish
Create TypeScript declaration types from your PHP models, enums, and other cast classes
🔗 https://github.com/abetwothree/laravel-ts-publish
Enhanced enums for Laravel
🔗 https://github.com/TimeZHero/laravel-enhanced-enums
Enhanced enums for Laravel
🔗 https://github.com/TimeZHero/laravel-enhanced-enums
You can use any type you create your own custom converter for, or for built in Unity types like Components or any Yarn Enums. They'll just work!
You can use any type you create your own custom converter for, or for built in Unity types like Components or any Yarn Enums. They'll just work!
It would be great if there was an easier way to have custom enums opt-in to behaviors of `Option` (like automatically implementing `.map`, etc.).
Like how in Haskell you would implement `Functor` for a custom type.
It would be great if there was an easier way to have custom enums opt-in to behaviors of `Option` (like automatically implementing `.map`, etc.).
Like how in Haskell you would implement `Functor` for a custom type.
https://jw-solutions.com/tools/code-formatter/tips/php/php-83-typed-properties-enums-psr12-refactoring/en/?utm_source=bluesky&utm_medium=social&utm_campaign=php-83-typed-properties-enums-psr12-refactoring
#php #CodeQuality #DevTools
https://jw-solutions.com/tools/code-formatter/tips/php/php-83-typed-properties-enums-psr12-refactoring/en/?utm_source=bluesky&utm_medium=social&utm_campaign=php-83-typed-properties-enums-psr12-refactoring
#php #CodeQuality #DevTools
feels like a similar tradeoff to booleans vs named enums in TypeScript / Rust, etc.
feels like a similar tradeoff to booleans vs named enums in TypeScript / Rust, etc.
· fonoster v0.61.0 — Enums exported and error messages improved
· fonoster v0.61.0 — Enums exported and error messages improved
https://shocm.me/posts/2026-11-11-php-86-debugable-enums-debuginfo/
https://shocm.me/posts/2026-11-11-php-86-debugable-enums-debuginfo/
This week's lineup:
🛠️ 𝑊ℎ𝑎𝑡'𝑠 𝑛𝑒𝑤 𝑖𝑛 𝑆𝑤𝑖𝑓𝑡: 𝑁𝑜𝑣𝑒𝑚𝑏𝑒𝑟 2026 𝐸𝑑𝑖𝑡𝑖𝑜𝑛
🔶 𝐶𝑜𝑑𝑎𝑏𝑙𝑒 𝑠𝑦𝑛𝑡ℎ𝑒𝑠𝑖𝑠 𝑓𝑜𝑟 𝑆𝑤𝑖𝑓𝑡 𝑒𝑛𝑢𝑚𝑠
📱 𝐹𝑖𝑛𝑎𝑙𝑙𝑦, 𝐴𝑝𝑝𝑙𝑒 𝐹𝑟𝑒𝑒𝑠 𝑢𝑠 𝑓𝑟𝑜𝑚 𝐷𝑜𝑚𝑎𝑖𝑛𝑠
This week's lineup:
🛠️ 𝑊ℎ𝑎𝑡'𝑠 𝑛𝑒𝑤 𝑖𝑛 𝑆𝑤𝑖𝑓𝑡: 𝑁𝑜𝑣𝑒𝑚𝑏𝑒𝑟 2026 𝐸𝑑𝑖𝑡𝑖𝑜𝑛
🔶 𝐶𝑜𝑑𝑎𝑏𝑙𝑒 𝑠𝑦𝑛𝑡ℎ𝑒𝑠𝑖𝑠 𝑓𝑜𝑟 𝑆𝑤𝑖𝑓𝑡 𝑒𝑛𝑢𝑚𝑠
📱 𝐹𝑖𝑛𝑎𝑙𝑙𝑦, 𝐴𝑝𝑝𝑙𝑒 𝐹𝑟𝑒𝑒𝑠 𝑢𝑠 𝑓𝑟𝑜𝑚 𝐷𝑜𝑚𝑎𝑖𝑛𝑠
https://shocm.me/posts/2026-11-11-php-86-debugable-enums-debuginfo/
https://shocm.me/posts/2026-11-11-php-86-debugable-enums-debuginfo/
but today i learned don't use them they're evil
but today i learned don't use them they're evil
load_page Twig function, TypeScript enums and typed form shapes for Symfony — the PHP companion to @silarhi/app-js
🔗 https://github.com/silarhi/app-js-bundle
load_page Twig function, TypeScript enums and typed form shapes for Symfony — the PHP companion to @silarhi/app-js
🔗 https://github.com/silarhi/app-js-bundle
Permission names, lists and checks for the models, action classes and enums of a Laravel app, with or without spatie/laravel-permission.
🔗 https://github.com/IGNE-Agency/laravel-permissions
Permission names, lists and checks for the models, action classes and enums of a Laravel app, with or without spatie/laravel-permission.
🔗 https://github.com/IGNE-Agency/laravel-permissions