Remove bounds check and exception from Data.String.Unsafe foreign code?

Open
#171 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Domain
tooling

Research direction

Start with the Data.String.Unsafe foreign code and compare its behavior with the safe API's unsafeJust entry point. Determine which bounds checks and exceptions the issue refers to, then verify that the foreign implementations consistently match the intended unsafe behavior across supported targets.

Written by the indexing model from the issue text.

Description

I think the bounds check and the exception are largely unnecessary. Presumably one would be using these APIs if they had already performed the requisite checks. If one wanted an exception (rather than undefined behavior), then there is unsafeJust on the safe API.

Dominant language
PureScript
Stars
57
Forks
76
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purescript/purescript-strings

All issues in purescript/purescript-strings

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.