Live data from Hacker News

Dada, an experimental new programming language

dada-lang.org

391–400 of 428 posts

Re: Dada, an experimental new programming language

#391
++ that gradual types are included … Rust does an awesome job of the contract you want with your compiler is enforce types strongly for maximum safety, but this is not always the appropriate trade off for small projects … i prefer a language with a sliding scale where i can grow a codebase and be more strict if and when it becomes more mission critical (gradual typing is the answer for this imo and is well done in eg rakulang)

Re: Dada, an experimental new programming language

#392

Earlier quoted context omitted.

I personally find the semantics of javascript a lot harder to internalize than rust due to its scoping and very unintuitive object system. I can't imagine this is any more difficult than that.

I agree but most modern JS doesn't use prototypal inheritance. JS has plenty of bad parts you shouldn't use. Classes are the main one.

Even checking the class of a given object feels quite flimsy to me, although this perhaps isn't a huge problem in a coherent codebase.

This isn't meant to be an attack on javascript as a worthwhile tool to learn, by the way, just a testament to the fact that it's not an easy language to master in the slightest.

Re: Dada, an experimental new programming language

#393

Earlier quoted context omitted.

Huh, typically print is the debug message function vs explicitly writing to stdout

Print is a debug function in some languages, but it's usually just stdout. You can add all kinds of logging libraries that wrap around print() with prefixes and control sequences to add colours, but I generally don't bother with those myself. In those circumstances, I would use something like logger.debug() instead of plain print(), though. I personally find myself using print debugging as a last resort when the debu…

There seems to be a conflation in two subtly different types of debugging here—one is simply regurgitating state while tracking down a specific bug on a local machine and should not be committed and the other is intended to be checked into possibly production code with the assumption being sent to a log aggregator. I think both are valid techniques, but one clearly benefits from the use of the `log` crate more than the other.

Re: Dada, an experimental new programming language

#394

Earlier quoted context omitted.

Yes, but then you need to be able to market your DSL and get buy-in. Otherwise you will forever be just a team of one. And then need to sell to all the stakeholders of the project the idea of trusting one person for all the development. So in addition to the skill of creating a DSL, you need the skills of thoroughly documenting it, training other people to use it, creating tools for it, and explaining the benefits in…

Every word you wrote is true. It's all still true if you replace "DSL" with any project and "Boring Old Language" with the competitor. This is the stopping at 90% problem somebody just posted a link to in another thread. edit: https://austinhenley.com/blog/90percent.html

No, for Boring Old Language other people have already solved those problems for you.

Re: Dada, an experimental new programming language

#395
post #153

I thought the creators of Rust were creator , singular, in Graydon Hoare. Are they involved with this?

It's complicated. Graydon Hoare is the founder of the Rust project and led it through its early days, but left the project before its 1.0. The Rust that shipped shares the tenets of the Rust that Graydon created, but it is also different in some foundational ways. Graydon has written about this (and also why he left the Rust project) online.

https://graydon2.dreamwidth.org/307291.html

https://www.reddit.com/r/rust/comments/7qels2/i_wonder_why_g...

Re: Dada, an experimental new programming language

#396
post #301

Earlier quoted context omitted.

That's a great example of the "simplicity" of Python being anything but.

This is not at all unique to Python, and a footgun present in any language that allows multiple threads. But if you're spawning multiple threads - in Python or any other language - you're already past any semblance of "simplicity", threads or no threads.

That's a good point regarding print, however several other languages make multithreading easy. F#'s async is easy and just works as does Erlang and Elixir of course. Python's asyncio is barely even an async library, much less one that is simple.

Re: Dada, an experimental new programming language

#397
post #396

Earlier quoted context omitted.

This is not at all unique to Python, and a footgun present in any language that allows multiple threads. But if you're spawning multiple threads - in Python or any other language - you're already past any semblance of "simplicity", threads or no threads.

That's a good point regarding print, however several other languages make multithreading easy. F#'s async is easy and just works as does Erlang and Elixir of course. Python's asyncio is barely even an async library, much less one that is simple.

F# async will not prevent you from causing data races.

Erlang does by basically not having shared mutable data.

Re: Dada, an experimental new programming language

#398

Earlier quoted context omitted.

One can argue that in the VAST majority of instances, you'll never ever be printing so much that you'll fill the buffer. If you need that kind of control, just get a direct stream to stdout, otherwise make print() block if it needs to.

You might not fill the buffer. But your program might crash before the buffer is flushed. In that case having prints explicitly block until the IO is completed is very valuable, especially when debugging. Nobody wants to waste time debugging their debug code.

Then just write to stderr, which is unbuffered (usually).

Re: Dada, an experimental new programming language

#399
post #220
post #31

Earlier quoted context omitted.

You don't have to do this, though. You can have an entrypoint.py that simply calls `main()` without that if. You don't even need to have modules if you want to, so you can write your functions and call them right after.

So in python, you need to understand not 1, but at least 3 different versions of “an entry point”, and to you, this is “less cognitive load”? I had the same issue with Swift. There’s 30 ways to write the exact same line of code, all created by various levels of syntax sugar. Very annoying to read, and even more annoying because engaging different levels of sugar can engage different rulesets.

Python has no concept of an “entry point”. You just run the program from start to end. What’s hard to understand about that?

Re: Dada, an experimental new programming language

#400
post #55
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.

I like Rust’s type system just fine but for me it’s types combined with language features like matching that draw me to Rust. When I was still learning I made an entire project using Arc with no lifetimes at all and it was actually a great experience, even if it’s not the textbook way to use Rust.

That's interesting - so you used Arc even if you didn't need thread safety?

Lifetimes elision works pretty well so you don't often need to specify lifetimes

It usually pops up when you use generics / traits (what concrete type does it match to?)

Post reply on HN