Language suggestion #12564
LucDuponcheelAtGitHub
started this conversation in
General Discussion
Language suggestion
#12564
Replies: 1 comment 4 replies
-
Hello @PSBP-Library, do you have an example where the written value is not exactly the read value? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Below is a language suggestion.
Just wanted to know if it makes sense at all.
I guess the answer is no
(otherwise much more clever guys than me would have introduced it already).
Here is the context of the suggestion.
Reading and writing are a bit like ying and yang
(technically, they are adjoint functors).
Traditionally
R => (Z => Y)
,Z => (Y && W)
, wheretype && = [Z, Y] =>> (Z, Y)
.Context functions of type
R ?=> (Z => Y)
make (among others) reading more convenient.I am a big fan of them.
Below is an example
(agreed, one that, on its own, does not really simplify things).
Reading and writing can be combined.
Below is an example.
Note that it uses
summon[Boolean]
to write what has been read.Now here is the suggestion.
Could it make sense to introduce, at language level, a type
&&?
so that functions of type
Z => (Y &&? W)
make (among others) writing more convenient.For example, the code above could then be simplified to
Beta Was this translation helpful? Give feedback.
All reactions