diff options
author | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
---|---|---|
committer | Samuel Lidén Borell <samuel@kodafritt.se> | 2024-06-02 21:20:48 +0200 |
commit | 580bf6130632f6855fddeea7b07c8401c56108f2 (patch) | |
tree | 4bd5e7cdb68408c52ad8df030f7f887c7d97def0 /notes/usability_improvements.txt | |
parent | db73835b12f41be8766384a1cdcc34a0848354dc (diff) | |
download | slul-main.tar.gz slul-main.tar.bz2 slul-main.zip |
Diffstat (limited to 'notes/usability_improvements.txt')
-rw-r--r-- | notes/usability_improvements.txt | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/notes/usability_improvements.txt b/notes/usability_improvements.txt index 1da5546..5935860 100644 --- a/notes/usability_improvements.txt +++ b/notes/usability_improvements.txt @@ -657,3 +657,69 @@ Perhaps some interactive functions that can work either in a GUI or in a CLI: This prevents both security and portability issues. - Similarly, strange Unicode characters (RTL, control, etc) should be replaced with replacement characters. + +Avoid special characters: Module headers +---------------------------------------- + +Instead of \ for module headers: + + \slul 0.0.0 + \name test + \version 0.1.0 + +It could be a ":" at the end: + + slul: 0.0.0 + name: test + version: 0.1.0 + +(Maybe some module headers should be renamed to better +work as "attribute:" rather than "\directive") + + +Avoid special characters: Type identifiers? +------------------------------------------- + +Can this be done at all? Is it a good idea? + +Currently: + + ref Thing t = .new(arena) + t.set_type(.a) + t.set_flags(.visible=true, .enabled=false) + +Could/should the dots be skipped? + + ref Thing t = .new(arena) + t.set_type(.a) + t.set_flags(.visible=true, .enabled=false) + + +arena-refs vs non-arena refs +---------------------------- + +This could be confusing, because no major language has arenas. + + ref Thing t1 = ... + arena Thing t2 = ... + + +Add tuple type and disallow it to contain certain types? +-------------------------------------------------------- + +A tuple type could be useful for e.g. multiple return values: + + func Thing.do_stuff() -> (int x, int y) + +Tuples: + +* Can be initialized with or without (e.g. (1,0)) field names +* Can be compared +* Can't contain funcrefs +* Can't contain structs directly +* Can't contain arrays of funcrefs/structs + +Structs: + +* Can only be initialized with field names, e.g. (.x=1,.y=0) +* Can't be compared? |