Derw is a programming language aimed at making complex apps in a simple way. It's built on top of TypeScript and Node, so it's easy to have interop with TypeScript.
sayHi: string -> string
sayHi name =
Derw is perfect for interactive web apps,. You can also use it to write command line tooling, and servers.
Derw prioritizes practicality above all else. The language is designed to empower developers to get things done in a straightforward and intuitive manner. Derw integrates seamlessly with other programming languages to enhance the development experience. Its syntax is particularly well-suited for those familiar with functional programming.
Derw is a language that is open to new ideas and approaches. If there is something that has not been done in Derw before, the community should work towards implementing it, and if it proves to be a valuable addition, it should be incorporated into the language.
While Derw is beginner-friendly, it is also designed to cater to the needs of experienced developers. It strikes a balance between simplicity and functionality, ensuring that developers of all levels can write efficient, high-quality code with ease.
Writing code that is provably correct allows developers to spend less time fixing bugs in production, leading them to deliver better products. Derw is not the answer to everyone's wishes; there are other languages out there that provide features others want, and that's okay! Derw is happy to sit in this space. You, as a Derw developer, should expect a well tested language that moves at a quick speed, helping you to write better code - and enjoy yourself while doing so.
Derw is a general purpose, functional, static, strongly-typed language. It may be both lazy and inferring at a later point.
Syntax-wise, Derw is most similar to Elm and Haskell, in that it is an ML-family language. The majority comes from Elm, so you'll see things like
:being used for type definitions,
let..infor definitions within a function or const, and type aliases rather than record types. Derw additionally adds
do..returnnotation, inspired by both Haskell and Idris.
Package-wise, Derw follows the Elm convention of packages always being by a particular name or organization. Names for packages should not be cute, but instead follow the convention of being named based on what they do. html should be called html, for example. One break with Elm is that due to the interop-story of Derw, it is possible to have a package.json listing dependencies that your Derw package may use.
Derw started as a collection of libraries for writing TypeScript in a more functional fashion, called Hiraeth. These libraries were mostly for my own use, but as I used them I realized that I needed a language that wasn't TypeScript to write code in my ideally preferred fashion. The best experience I have had to this point for writing web apps has been with Elm, and having been a contributor to Elm, I figured that I could achieve something similar with some differences.
Derw is currently developed in my spare time, but that doesn't mean progress is slow. In fact since Derw started, there's been over 1000 commits to Derw-related projects and repos. The pace really picked up once Derw reached a point where I could start writing things in it and have them work - i.e, once the compiler was generating code and running without bugs. I'm a big believer in designing tooling and APIs through real-world usage. Derw has been used for several real-world apps now, some quite complicated, which helped nail down the remaining bugs.
Every time a new bug is found, I try to add a test to the comprehensive test suite that ensures that the bug won't be encountered again. This allows me to make big refactors quickly.
To keep track of features and bugs, I use a private Pivotal Tracker instance that allows me to write down my thoughts as they come from my head, and prioritize them on a monthly basis. Each month I write up a summary of all the changes on the Derw blog.