effekt-lang / effekt-lang/effekt

Different `length` implementations for strings in LLVM/JS

Open
#1,126 4 comments 0 reactions 0 assignees View on GitHub
area:js area:llvm area:stdlib
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

Inspired by [this blog post](https://hsivonen.fi/string-length/) on string lengths, `"🤦🏼‍♂️".length` returns 7 or 17 depending on using LLVM/JS as backend.

We should choose a unified implementation instead - probably UTF-8 everywhere?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the string-length implementations in the LLVM and JavaScript backends, then read the linked blog post to understand the competing interpretations. Define which length semantics should be shared, implement the unified behavior in both backends, and verify that the example produces the same result everywhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
compilers
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.