Thread overview
Create a new language ?
Nov 06, 2023
Alain De Vos
Nov 06, 2023
Sergey
Nov 06, 2023
Alain De Vos
Nov 07, 2023
Alain De Vos
Nov 07, 2023
Alain De Vos
November 06, 2023

Why not create a new language.
With ideas from scala,ocaml,f#,haskell.
A language from scratch.
With syntactic sugar as needed.
But where the language compiles to a simple dlang .d file.
Which you compile to an executable using ldc2.

Now features are available as libraries but it leads to "ugly code" as reader of code.
And there are multiple ways of doing the same thing which means the reader of code has to know all the ways. Enforce one way.

Feel free to elaborate.

November 06, 2023

On Monday, 6 November 2023 at 20:00:51 UTC, Alain De Vos wrote:

>

Why not create a new language.
With ideas from scala,ocaml,f#,haskell.
A language from scratch.
With syntactic sugar as needed.
But where the language compiles to a simple dlang .d file.
Which you compile to an executable using ldc2.

Now features are available as libraries but it leads to "ugly code" as reader of code.
And there are multiple ways of doing the same thing which means the reader of code has to know all the ways. Enforce one way.

Feel free to elaborate.

What is the reason to use D as a backend?
Usually people using C or LLVM.

Also Scala, OCaml, F#, Haskell - all functional languages. Maybe you will be interested in https://www.roc-lang.org - very young language and WIP. You can participate in development.

November 06, 2023

Except for dotnet or java , i use freebsd alot.
Already a problem for roc.
No idea how to make roc work on freebsd ? Even if i have a clang-llvm & gcc toolchain.
Compare, with scala-native i can compile very easy to self-contained-executables on freebsd...

Why d-lang ?
Why not d-lang ?
Example.
https://www.smlnj.org/
Not bad as language, but i can't bind to any external library. It's pure academic.

Dlang. Why not build on what already exists ? Functional came afterwards, after object oriented.
Even if it is implemented in a library, "an sich", not necessarily bad idea.
If it works it's ok. But it's currently ugly.

November 07, 2023

simple example :

In invented programming language you write :

x |> y |> z

Translates towards dlang :

functional_pipeline_from_left_to_right(x,y,z)

I.e. pipe! in std.functional.

November 07, 2023

or

type Temperature = Fahrenheit | Celsius | Kelvin

translates to :

std.sumtype
->
alias Temperature = SumType!(Fahrenheit, Celsius, Kelvin);