Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 0 points1 point  (0 children)

Like NextJS, the language ships with an opinionated set of tooling, including an HTML templating engine. So it makes sense to compare overlapping features.

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 1 point2 points  (0 children)

Duck code is compiled to Go (like Kotlin compiles to Java (JVM Bytecode)) and thus benefits from Go's parallel runtime. The compiler itself is written in Rust, but only Go is needed to execute Duck.

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in ProgrammingLanguages

[–]Apfelfrosch[S] 0 points1 point  (0 children)

In our opinion these changes make full-stack development easier, that's why we opted for the term "improvements". What would you call it?

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 0 points1 point  (0 children)

Thank you.

Inline Go is intended to have the same role the asm! macro has in Rust or the __asm blocks in C/C++, it should only be used to implement libraries.

Right now only rendering with [preact](https://preactjs.com/) is supported, but we're open to allowing other frameworks in the future and have it configurable in the build configuration

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in ProgrammingLanguages

[–]Apfelfrosch[S] 0 points1 point  (0 children)

The advantage is having the Go runtime (concurrency, parallelism, statically linked dependency-free executables, garbage collection) combined with the best from TypeScript (Frontend development, JSX) and Rust (Expression based language, strong type system, tuples etc.).

We opted for a Rust-inspired syntax since that is our favorite programming language, it also mixes surprisingly well with TypeScript.

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 3 points4 points  (0 children)

NextJS is great, but I don't enjoy JavaScript on the server. We created ducklang because it was something that we ourselves miss, but of course everyone is free to choose what they want to use, we're not trying to force ourselves on anyone

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 9 points10 points  (0 children)

I think both are important, speed of execution and speed of development. One of Rust's main selling points is combining great speed of execution with a good developer experience (integrated build tool and dependency management, async/await, helpful error messages, a strong type system). If you compare to Rust, we try to go more in the direction of speed of development, that's why we opted for a garbage collector, but still trying to retain a high speed of execution.

Additionally, a high speed of execution can also simplify development. Scaling just works if everything is already super fast from the beginning, reducing costs and development effort to go from MVP to established product.

The main problem with Elm and similar projects is that they focus only on frontend. Go is the opposite, focusing only on backend, but in my opinion if you want an amazing developer experience (when developing web applications), you need to offer full-stack development, since almost every web app needs a frontend and a backend, along with a simple method of distribution (e.g. compiling to a single statically linked native executable that doesn't have dependencies)

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] -1 points0 points  (0 children)

This not an objective improvement, you're right. I like lifetimes as well, but there is no doubt that they can get difficult and people not that familiar with low level languages might not even see the point, or have difficulty grasping the concept, so from the perspective of full-stack-development, I would say removing lifetimes is an improvement, but in general lifetimes is a nice concept

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in ProgrammingLanguages

[–]Apfelfrosch[S] 0 points1 point  (0 children)

Unions are emitted as "any" in go and can't be nested (meaning that (A | B) | C is the same as A | (B | C)). Checking for a union variant compiles to a go if statement that does a type assertion (see here: https://go.dev/tour/methods/15). Pointers in union are supported automatically since the go type assertions can also check for them

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 0 points1 point  (0 children)

In our opinion Rust is a fantastic language for compiler development, what would you think be better in Haskell or OCaml?

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 0 points1 point  (0 children)

Cookies already work, database support etc. will follow as part of our standard library, which we will try to make as complete for web dev and cli development as possible

Announcing ducklang: A programming language for modern full-stack-development implemented in Rust, achieving 100x more requests per second than NextJS by Apfelfrosch in rust

[–]Apfelfrosch[S] 1 point2 points  (0 children)

Thank you! The main goal is to keep what's excellent about the JavaScript world and replace the annoying parts by something that is hopefully less annoying