It's weird, I want pretty much the exact opposite of this: a language with the expressive type system and syntax of rust, but with a garbage collector and a runtime at the cost performance. Basically go, but with rusts type system. I'm aware that there are a few languages that come close to this (crystal iirc), but in the end it's adoption and the ecosystem that keeps me from using them.
... so OCaml or StandardML then
Dada, an experimental new programming language
41–50 of 428 posts
Re: Dada, an experimental new programming language
#42I do consider the lightning start-up speed of a program to be one of the killer features of Rust. Rust with garbage collection throws away one of it's biggest advantages compared to every other language around.
Re: Dada, an experimental new programming language
#43Earlier quoted context omitted.
It's a leaky abstraction ( https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-a... ), but maybe there is no helping it and for some reason it is a necessary tradeoff for performance?
Maybe it’s actually a non-leaky abstraction because it makes the async-nature explicit. The alternative is hiding it, but it’s still going to affect your code, making that effectively a leaky abstraction.
Re: Dada, an experimental new programming language
#44Dada: https://en.wikipedia.org/wiki/Dada
Perhaps his most famous piece is a photo of Hitler captioned "millions stand behind me," showing a donor passing him stacks of cash.
Re: Dada, an experimental new programming language
#45Their Hello, Dada! example: print("...").await I'm coming from Python, and I can't help but ask: If my goal as a programmer is to simply print to the console, why should I care about the await? This already starts with a non zero complexity and some cognitive load, like the `public static void main` from Java.
I'd say you want something like 'debug_msg()' for this. 'print()' should be async because it does IO. In the real world most likely you'd see the output once you yield.
.NET core will introduce something similar
Re: Dada, an experimental new programming language
#46It's weird, I want pretty much the exact opposite of this: a language with the expressive type system and syntax of rust, but with a garbage collector and a runtime at the cost performance. Basically go, but with rusts type system. I'm aware that there are a few languages that come close to this (crystal iirc), but in the end it's adoption and the ecosystem that keeps me from using them.
Re: Dada, an experimental new programming language
#47Earlier quoted context omitted.
Huh, typically print is the debug message function vs explicitly writing to stdout
I don’t think so. Normally print isn’t a debug message function, people just use it like that. (it normally works on non debug builds)
If your console app is writing output to any device, it must, for instance, handle errors gracefully.
That means, at least in Rust, write! rather than print!.
Re: Dada, an experimental new programming language
#48Earlier quoted context omitted.
The reasoning with await is valid, it's an I/O call, but the await should maybe be hidden inside the print then?
It MIGHT or might NOT be valid, it depends. In a lot of cases, I might just want to print, but not yield "right here," but later (if at all in the current method). Further, writing to i/o is usually non-blocking (assuming the buffers are big enough for whatever you are writing), so in this case, the await literally makes no sense.
IO is inherently extremely complicated, but we always want people to be able to do their simplified form without thinking about it.
Re: Dada, an experimental new programming language
#49That would be Swift?
Interesting experiment. But it does seem like there are increasing numbers of languages trying to crowd into the same spaces.