Live data from Hacker News

Dada, an experimental new programming language

dada-lang.org

221–230 of 428 posts

Re: Dada, an experimental new programming language

#222
post #166

I've written a bit of Rust, and I was left with mixed feelings, that seem to be still the same here: - loved the memory safety patterns when compared to the horrible things that you can do with C++ - found almost every thing where it was different to have a harder to parse syntax, that I could never get used to. The implicit return at the end of a statement for instance make it harder for me to visually parse what's…

> I know it sounds nitpicky, but to me all keywords should be obviously pronounceable, so something like "func" instead of "fn" would be mandatory.

Keywords only? How about function names like strspn or sbrk? And how do you feel about assembly language, using mnemonics like fsqrt or pcmpeqd?

BTW, thinking about it, I notice, that I need all these lexemes to be pronounceable too, and I have my ways to pronounce sbrk or pcmpeqd. Probably if I do it aloud no one will understand me, but it doesn't matter because these pronunciations are for internal use only.

Re: Dada, an experimental new programming language

#223
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.

Yeah I'm not so sold, but mainly, I don't understand the logic here

If I'm declaring an async function, why do I need to await inside it?

like, if the return of an async function is a promise (called a thunk), why can't I do

async async_foo() { return other_async_foo(); } and it will just pass the promise?

Then you await on the final async promise. Makes sense?

Re: Dada, an experimental new programming language

#224

Every time I see a new language, I immediately check if it uses significant white space like Python. If it doesn’t, I sigh sadly and dismiss it.

This is such a weird take... I just want to know why is that SO important to you? For me that is one of the things that I like the least with Python.

Re: Dada, an experimental new programming language

#225
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.

TypeScript maybe?

Maybe ReScript?

Re: Dada, an experimental new programming language

#226
post #167

Earlier quoted context omitted.

I also noticed this, along with the warnings that Dada doesn't really exist yet (which is fine, thanks for the heads up). I predict this project will have its priorities backwards. There's a group of people who want to govern a programming language project, and inject their ideology into that structure, and maybe there's another group of avid language designers in there too. I think there are more of the first.

How do you “inject ideology” in a programming language? Compiler error if the variable name is sexist?

[deleted]

Re: Dada, an experimental new programming language

#228

Earlier quoted context omitted.

Just for context, the quoted manifesto was originally written in French ( https://monoskop.org/images/3/3b/Dada_3_Dec_1918.pdf ). In that version, that particular sentence is gender neutral: "tout le monde fait son art a sa façon". I would say that that their updated quote is a more accurate translation of the original than the English translation they initially used.

That does make it a lot better, but at the same time makes the footnote even more of a deliberate statement that could have been left out.

> That does make it a lot better

Why?

Re: Dada, an experimental new programming language

#229

I think there isn't enough research into languages with affine/linear typing (the property of some types that they can't be copied - which is partly what the borrow checker ensures in Rust). I'm super sold on it for enhancing safety. Vale with its "Higher RAII"[0] is the only other example I was aware of until seeing this. Rust is great but being an early adopter has made its usability imperfect in places. Combining…

Have you look at Austral?[0] It is a system language with affine type as the main selling point. I really, really like its specifications, in particular the design goals and rationale.

[0]: https://austral-lang.org/

[1]: https://austral-lang.org/spec/spec.html#goals

Re: Dada, an experimental new programming language

#230
post #32

Earlier quoted context omitted.

That sounds… bad? The whole point of rusts type system is to try to ensure safe memory usage. Opinions are opinions, but if I’m letting my runtime handle memory for me, I’d want a lighter weight, more expressive type system.

Rust's type system prevents bugs far beyond mere memory bugs. I would even go as far as claiming that the type system (together with the way the standard library and ecosystem use it) prevents at least as many logic bugs as memory bugs.

The type system was built to describe memory layouts of types to the compiler.

But I don’t think it prevents any more logic bugs than any other type system that requires all branches of match and switch statements to be implemented. (Like elm for example)

Post reply on HN