Live data from Hacker News

Dada, an experimental new programming language

dada-lang.org

41–50 of 428 posts

Re: Dada, an experimental new programming language

#41
post #25

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

Or Haskell!

Re: Dada, an experimental new programming language

#42
The absence of GC, makes embedded Rust a joy. It can be easily attached to other programs like Erlang with NIFs, Javascript and web pages with Web Assembly and Emacs with command line execution. Micro-controllers as well of course.

I 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

#43
post #22
post #19

Earlier 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.

Maybe there could be something like a aprint() wrapper, if the authors wanted to make the async nature explicit? Or something else, probably not this for one of the most common things a programmer must do.

Re: Dada, an experimental new programming language

#44
post #14

Dada: https://en.wikipedia.org/wiki/Dada

Very cool art movement: it's essentially a prototypical form of Photoshop/meme culture as protest against the Nazis. John Heartfield is my favorite Dada artist.

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

#45
post #10
post #6

Their 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.

gevent handles async fine without the explicit async/await

.NET core will introduce something similar

Re: Dada, an experimental new programming language

#46
post #25

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.

You might enjoy F#. It's a lot like OCaml (which others have mentioned) but being part of the .NET ecosystem there are libraries available for pretty much anything you might want to do.

Re: Dada, an experimental new programming language

#47
post #35

Earlier 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)

Printing directly to the console, even in a console app, is for debug purposes only.

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

#48

Earlier 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.

The canonical reason a language adds a utility like print over just offering the services of the underlying console is to make the Hello, World example as terse as possible.

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

#49
> What if we were making a language like Rust, but one that was meant to feel more like Java or JavaScript, and less like C++?

That would be Swift?

Interesting experiment. But it does seem like there are increasing numbers of languages trying to crowd into the same spaces.

Post reply on HN