Dada, an experimental new programming language
391–400 of 428 posts
Re: Dada, an experimental new programming language
#392Earlier 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.
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
#393Earlier 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…
Re: Dada, an experimental new programming language
#394Earlier 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
Re: Dada, an experimental new programming language
#395I thought the creators of Rust were creator , singular, in Graydon Hoare. Are they involved with this?
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
#396Earlier 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.
Re: Dada, an experimental new programming language
#397Earlier 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.
Erlang does by basically not having shared mutable data.
Re: Dada, an experimental new programming language
#398Earlier 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.
Re: Dada, an experimental new programming language
#399Earlier 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.
Re: Dada, an experimental new programming language
#400Earlier 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.
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?)