Clarify the drawbacks of unsafe functions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- haskell
- Ambito
- documentation
Direzione di ricerca
Inizia con la documentazione del modulo e la documentazione delle funzioni head e unsafe menzionate nell’issue. Verifica come si comporta un vettore vuoto passato a head e come falliscono le funzioni unsafe; la documentazione è completa quando avverte chiaramente dell’errore a runtime e di un possibile segmentation fault.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi, I'm opening this issue regarding the documentation of the following functions:

Nowhere in the module documentation or in those functions it is said clearly the fact that:
- Given an empty vector,
headwill raise a runtime error; unsafefunctions do not lead to RTS exceptions (like they may do in other container-like APIs), but will segfault the program. Beginners and more generally people who did not experience this behaviour first-hand are in no way warned of the implications of usingunsafefunctions (who are then closer than Rust’sunsafethan the commonly accepted definition of safety in the Haskell ecosystem).
I personally think it is dangerous to leave such gaps in the documentation and wanted to discuss this with the maintainers before opening a PR to rectify this.
cc @cartazio
- Lingua principale
- Haskell
- Stelle
- 401
- Fork
- 145
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di haskell/vector
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
`Size` can be a newtype. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di haskell/vector
Issue simili
-
typst-0.12 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
commercialhaskell/stackage#8127 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
input-output-hk/haskell.nix#2573 ·
-
docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
needs triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100