-
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 istekhelp wanted | yardım isteniyorExtra attention is needed | Ekstra dikkat gerekliExtra attention is needed | Ekstra dikkat gereklitodo | yapılacaklarsomething we are to do | yapacağımız bir şeysomething we are to do | yapacağımız bir şey
Description
A proposal to add Rust-like structs(without types) to the language. As in Turkish struct means yapı, which also means building. It may be a confusing name. Thus after some consideration I renamed them to şekil (shape). Enums have been directly translated into sayım. And here is the syntax proposal. methods are metot or yöntem and new is yeni
# A struct
şekil Human
name
age
gender
son
# An enumeration
sayım Gender
male female # at runtime assigned to 0 and 1
# or instead of at runtime we turn it into this
# blok Gender
# 0 -> male
# 1 -> female
# son
# thus enums can also be compared with numbers
son
# With this syntax you can only implement things in scope
metot is-male >> Human # methods have self thrown into them as a value when executed
:gender = Gender:male ver
son
# Creating a member function that doesn't take self
bağlı işlev new-human >> Human -> gender -> age -> name
yeni Human # initializer keyword: yeni
name age gender
son ver
sonMetadata
Metadata
Assignees
Labels
enhancement | yükseltmeNew feature or request | Yeni özellik veya istekNew feature or request | Yeni özellik veya istekhelp wanted | yardım isteniyorExtra attention is needed | Ekstra dikkat gerekliExtra attention is needed | Ekstra dikkat gereklitodo | yapılacaklarsomething we are to do | yapacağımız bir şeysomething we are to do | yapacağımız bir şey