# SE-0559: Add \`bidiClass\` to \`Unicode.Scalar.Properties\`

**URL:** <https://forums.swift.org/t/se-0559-add-bidiclass-to-unicode-scalar-properties/90186>\
**Category:** Proposal Reviews\
**Created:** [October 21, 2026, 4:19pm UTC](https://forums.swift.org/t/se-0559-add-bidiclass-to-unicode-scalar-properties/90186 "2026-10-21T16:19:48Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Michael\_Ilseman](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/michael_ilseman/32/44640_2.png) [@Michael\_Ilseman](https://forums.swift.org/u/Michael_Ilseman)\
**Post date:** [November 3, 2026, 8:29pm UTC](https://forums.swift.org/t/se-0559-add-bidiclass-to-unicode-scalar-properties/90186/7 "2026-11-03T20:29:16Z")

</div>

> [@grynspan](#):
>
> I'll bikeshed `bidirectionalCharacterClass`

I think that's a perfectly reasonable alternative name.

> [@xwu](#):
>
> Unless I'm mistaken, the proposal here is choosing to expose `rawValue` publicly. There's a tradeoff for that (in that it's not meaningful) but an understandable choice.

It's needed for the `RawRepresentable` conformance. We don't have anything to match in-memory representations with, so it's not adding as much signaling value to this type as for other types that follow this pattern. But, given that it's frozen, I don't feel that we should go out of our way to hide the raw value.

> [@xwu](#):
>
> But, given that choice, I _believe_ a ~~`@c`~~ `@objc` enum that uses `UInt8` raw values would satisfy all of these problems. Has that been explored? The type would be nonfrozen but occupy a single byte, be passed and returned directly across library evolution boundaries, support nesting inside the `Unicode` namespace, and work without Obj-C interop.

It would land us in a similar position. From an aesthetic perspective, it feels a little off as this has nothing to do with Objective-C. Practically speaking, I think it would add a synthesized trapping default case in switches with no explicit default. I'm not sure whether that's valuable or not.

Understanding what effect these annotations have in practice ends up being a small research project every time. Whatever the behavior actually is, `@objc` communicates our intent less directly than `@frozen`. I am open to it, but would like some more guidance from the LSG on using these attributes for "off label" purposes.

---

_[View the full topic](https://forums.swift.org/t/se-0559-add-bidiclass-to-unicode-scalar-properties/90186)._
