harfbuzz icon indicating copy to clipboard operation
harfbuzz copied to clipboard

Prefix wasm objects and functions with *something*

Open behdad opened this issue 2 years ago • 8 comments

(motivated by https://github.com/harfbuzz/harfbuzz/issues/4456)

The current no prefix (face_create) etc is really bad. I'm not sure what to prefix with. Just wasm_?

behdad avatar Oct 21 '23 23:10 behdad

Do we expect this API to be implementable as is by non-HarfBuzz implementations? if no, I’d go with hb_wasm_ or wasm_hb_ since they are very HarfBuzz-specific.

khaledhosny avatar Oct 22 '23 11:10 khaledhosny

@simoncozens expressed in another thread, that he's fine with just wasm_.

Do we expect this API to be implementable as is by non-HarfBuzz implementations?

That was my intention. But realistically I don't expect them to.

if no, I’d go with hb_wasm_ or wasm_hb_ since they are very HarfBuzz-specific.

Maybe hb_wasm_ then. Fortunately it's just a macro and can be easily changed.

behdad avatar Oct 24 '23 20:10 behdad

Maybe wasm_hb_ is less confusing.

behdad avatar Oct 24 '23 21:10 behdad

Humm. It's not as simple as changing a macro. The type names also need to change, and the macros.

I wonder if we should use the hb_ prefix for the simple types like codepoint_t, position_t, mask_t, tag_t, direction_t, where the definition matches the regular API.

behdad avatar Oct 24 '23 21:10 behdad

I wonder if we should use the hb_ prefix for the simple types like codepoint_t, position_t, mask_t, tag_t, direction_t, where the definition matches the regular API.

I think it makes sense, yes.

khaledhosny avatar Oct 26 '23 00:10 khaledhosny

How about hbw_?

behdad avatar Jun 28 '24 22:06 behdad