Receiver type lambdas and DSLs #1707
Mohan-aggarwal
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, i really liked the idea about carbon language, and i would love to see it growing, u know, i was thinking about making a new language to replace c++, but i guess i don't have enough time/resources to do that, but im really impressed by the design of carbon language, so i want to present some more idea that u might find interesting.
U know, i've been doing programming in Kotlin more than 2 years now, and one of the thing that i like the most is the receiver type lambdas and how we have DSLs in Kotlin that makes programming so much enjoyable, like there is a very different HTML DSL to write web apps in kotlin, there is Jetpack Compose, Compose Multiplatform and TornadoFX which have DSLs that help us define the UI of the application very easily, there is Ktor which simplifies configuration for routes using DSL, and Data2Viz & charts.kt have DSL for data visualization and the lists goes on. So since carbon is inspired from kotlin a little bit, it can have this too, u can read this documentation to properly understand receiver type lambdas.
And see this to know how we can make DSLs in Kotlin.
Other than that, i know carbon might use macros for metaprogramming but which language macros would be similar to??
Beta Was this translation helpful? Give feedback.
All reactions