-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancement | yükseltmeNew feature or request | Yeni özellik veya istekNew feature or request | Yeni özellik veya istektodo | yapılacaklarsomething we are to do | yapacağımız bir şeysomething we are to do | yapacağımız bir şey
Description
so another syntax proposal I have is this simple syntax that is very effective
and much more user friendly than x, y -> a -> b (which will result in a = y, b = x)
# sets a = 1, b = 2
1, 2 |a, b| ile
# can be used as a way of expecting function arguments
işlev name |a, b| ile
...
son
# we can implement for .. in loops easily
[1, 2, 3, 4, 5] için |i| ile
...
son
# Destructuring
# Get first element of list
[1, 2, 3, 4] |[a, ..]| ile
# Get a and b from a block
blok c
1 -> a
2 -> b
son
c |{a, b}| ileit can also be used as a way of bringing multiple things into scope
yükle ".." -> a
a |b, c, d| ileIn the background it would probably function as taking elements from the stack in reverse order
for pattern destructuring it would probably be destructure objects with curly braces
for list destructuring it would again reverse order and take
meanwhile .. means reverse order again and can only be used once
Metadata
Metadata
Assignees
Labels
enhancement | yükseltmeNew feature or request | Yeni özellik veya istekNew feature or request | Yeni özellik veya istektodo | yapılacaklarsomething we are to do | yapacağımız bir şeysomething we are to do | yapacağımız bir şey