https://github.com/kacperfkorban/lazycall
A lightweight library that lets You write unreadable code
https://github.com/kacperfkorban/lazycall
dotty scala scala3
Last synced: 6 months ago
JSON representation
A lightweight library that lets You write unreadable code
- Host: GitHub
- URL: https://github.com/kacperfkorban/lazycall
- Owner: KacperFKorban
- License: apache-2.0
- Created: 2021-06-12T01:48:05.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-06-18T22:36:02.000Z (about 5 years ago)
- Last Synced: 2025-04-10T02:46:10.490Z (over 1 year ago)
- Topics: dotty, scala, scala3
- Language: Scala
- Homepage:
- Size: 12.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LazyCall
Tired of having to call right methods? Tired of having to know names of methods?
Do You often find Yourself looking at Your code and thinking that it is too nice and readable?
Are You worried that Your employer will fire you and someone else will maintain Your code?
---
Boy! Do I have a thing for You.
Now You can call accessor functions without using their names. Just use `.magicGet` extension method with required type as parameter.
```scala
import lazycall.*
case class XD(i: Int) {
def a: Long = i.toLong
}
XD(1).magicGet[Long]
```
Disclaimer: The work `lazy` in name has nothing to do with the way methods are called. It only describes the state of mind of potential user.