Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ahmadrosid/yuk
Programming language that compile to Go.
https://github.com/ahmadrosid/yuk
Last synced: 22 days ago
JSON representation
Programming language that compile to Go.
- Host: GitHub
- URL: https://github.com/ahmadrosid/yuk
- Owner: ahmadrosid
- Created: 2022-07-18T13:32:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-31T11:51:37.000Z (over 2 years ago)
- Last Synced: 2024-06-21T09:31:35.362Z (5 months ago)
- Language: Go
- Size: 48.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# yuk - Programming Language
Programming language that compile to go.## What the hell is this is about?
I love and hate golang. I love rust safety, but I can not use it at my work.
Golang is fine, it works it fast and enough for the day-to-day work.But often I found myself still need to fix some stupids bug which is dealing with panic issue because of nil pointer error.
I also hate how to stupid I'm when writing code in Go when it comes to error handling. I don't want to write repetitive code, I just want to finish my task.
The goal for this language is to prevent common bug because the unsafely of go, and just getting thing done and be productive.
## The Idea
The goal is to nil safety and be more productive. I want to write important things not the boilerplate.
```go
package yukimport "fmt"
import "encoding/json"type Name string
struct User(First TokenType, Last string)
struct Post (
Title string `json:"input"`
CreatedBy User `json:"created_by"`
CreatedAt Date `json:"created_at"`
UpdatedAt Date
)
struct Wrong(count int)func ReturnFunc() string {
return "hello"
}// this is comment
func main() {
var name = "Ahmad Rosid"switch name {
'=' => {
var you = "rock"
return tok
},
'!' => {
var me = "lads"
break
},
_ => {
var nooo = "no"
break
}
}var data = map(string, interface) {
"name": 1,
"date": "2022-07-27"
}if true {
var ok = "works"
} else {
var ok = "not works"
}
}
```**Roadmap**
- [x] Easier to create struct
- [x] Simple switch statement
- [x] Handle multiple case statement
- [x] Shortcut map
- [ ] Anonymous struct
- [ ] String extentions `"some".len()`, `some.is_empty()`
- [ ] Array extentions `[1,2,3].len()`, `arr.is_empty()`
- [ ] Anonymous struct
- [ ] Easier to implement struct
- [ ] Mutable and immutable struct implementation
- [ ] Macro
- [ ] Typechecker
- [ ] Unsafe