Hacker News new | ask | show | jobs
by femngi 4240 days ago
I have to ask what this language is trying to provide that isn't already provided by lua or python when it already looks almost identical to them. Has it got an end goal that I cannot see or is it just being done out of an interest in programming languages?
5 comments

> or is it just being done out of an interest in programming languages

That would be enough. I believe more people should be thinking about programming languages - even if it's just for fun or learning.

> what this language is trying to provide that isn't already provided by [...]

Most languages don't provide things that aren't technically also provided by others. It's more about how they are provided, what the language's strengths are, and how it wants programmers to approach problems.

Showing people what your language is all about is harder than it seems at first. Duck could probably do with a more in-depth tutorial and some talking points in order to better inform people about its features.

This made me look at the website of my own perpetually unfinished language project, and even though I knew I had to make an effort to showcase the thing in the tutorial section, upon reviewing it now I don't think it was particularly successful. Arguably, there are even some high profile languages that don't do a good enough job explaining what they're about, though website quality has picked up dramatically across the board in recent years.

> That would be enough. I believe more people should be thinking about programming languages - even if it's just for fun or learning.

Yes. Having a solid understanding of how languages work makes exploiting particular strengths of any one easier. It makes polyglot approach viable. It makes you less dependent on external tools and support from other people, as you can always roll your own linter, autocompleter or other such things. Being able to debug and modify your language is rather extreme, but very effective measure against some development problems.

It doesn't even need to be that great of a time investment to learn the basics. I see no reason for not doing this if you're a professional programmer. Language design and implementation is a thing that you'll interact with every day working as a programmer. It really makes no sense not to have at least basic grasp of it.

These are good questions.

The end goal is much farther along than what's being presented now. This has, for the most part, been a one person effort. I was motivated by my Compilers course and a minimal Java compiler we developed targeting MIPS to start a project creating my own language.

Much of my experience with programming languages has been with interpreted or scripted languages. I find that they have a really low barrier to entry. But ideally Duck would have its own binary compiler and other tools. It's just that right now, in the language forming stage, it makes sense to formalize all aspects of the programming language first. In the future, it might be the case that Duck has significantly better performance than Lua or Python, but I can't really tell at the moment, especially without some tweaks to the language that move it towards static/strongly typed code. This is just the nature of reality.

So yes, it's mainly a toy language at this stage, but I would like to see it optimally used as a game language. I think it may be extremely easy to have it facing several different platforms, and use it as a high-level abstraction for loading 3D meshes and manipulating an interactive world.

I have no idea. Probably an interesting project for the author, or maybe they are trying to fix some backwards-compatibility debt from the aforementioned languages. Either way, it would be good to see this mentioned as the first point on the page because it will be the first thing everyone will be thinking.
From the front page:

"It is easy to port libraries to Duck. Function hooks are implemented as pointers, of the form int (function_pointer)(int) where the argument count is passed as the only parameter. Arguments are bound as string identifiers, and are accessed dynamically in the bound-function's body."

I don't know the details but in my experience reducing the impedance mismatch to low level libraries is often a strong motivator to create one's own dsl instead of adopting a standard scripting language.

Best answer: It's free to use and super easy to customize