The Dragon Programming Language(dragon-lang.org)
dragon-lang.org
The Dragon Programming Language
https://dragon-lang.org/
53 comments
Really hard to take seriously. The writing on the homepage looks so generic it could have been generated by ChatGPT. The example code on the homepage - after lots of talking and babbling - is just one line to print some text.
Even after I saw it has a half-baked custom IDE, I still thought maybe I could give it the benefit of the doubt. "Maybe it has some niche purpose and there is actually some cult/community? Let's check the Community menu link." It was broken.
But it says it's innovative!
Innovation and $2 will get you a cup of coffee, as long as you don't have fancy tastes in coffee.
It's as innovative as hobbyists adding confetti (and other decorations) to a reinvented wheel.
> The supported programming paradigms are imperative, object-oriented, declarative using nested structures, functional and natural programming.
What is "natural programming" supposed to be?
> Dragon Native
What is dragon native? How does it differ from Dragon? Where is this difference explained? I mean, this is right in the middle of the top thing I see on the webpage.
From the docs:
From the docs:
From the docs:
From the Dragon native documentation:
What is "natural programming" supposed to be?
> Dragon Native
What is dragon native? How does it differ from Dragon? Where is this difference explained? I mean, this is right in the middle of the top thing I see on the webpage.
From the docs:
show and showln operators are used to output text.
What is the advantage of making these operators instead of functions like `printf()`?From the docs:
readChar(f) - reads one char (2 bytes). Returns number char's code
What is the definition of "char" here? Why is a "char" 2 bytes long?From the docs:
for initializing, condition, increment {
body
}
// or
for (initializing, condition, increment) {
body
}
// or
for (initializing, condition, increment)
body
end
Why are there multiple ways of writing the same syntactic construct?From the Dragon native documentation:
Not Case-Sensitive
Since the Dragon native is not case-sensitive, the same program can be written in different styles
In the very next sentence, the documentation states this: It’s better to select one style and use it in all of the program source code
So why not just enforce a style in the first place?> Since the Dragon native is not case-sensitive, the same program can be written in different styles
This always seems like a good idea until many people start using it different ways
There’s a reason tons of languages from python to zig all have said they want “only one way of doing something”
This always seems like a good idea until many people start using it different ways
There’s a reason tons of languages from python to zig all have said they want “only one way of doing something”
But it's one thing to emphasize a naming convention, and another thing to simply not compile because I want the function be named doSomething() but am forced to name it do_something(). With a naming convention or an included formatter I still can write my style. At least until I'm used to the language's native naming style.
Being forced just annoys me and keeps me from using the language at all. (Because languages differ here extremely.)
Being forced just annoys me and keeps me from using the language at all. (Because languages differ here extremely.)
This isn't about enforcing how new things are named, this about enforcing using already existing names consistently.
If the documentation says "there is a thing named foobar", but in the code I can see Foobar, FooBar, FOOBAR, FOObar, etc. used interchangeably, that's not gonna help readbility and maintainability.
If the documentation says "there is a thing named foobar", but in the code I can see Foobar, FooBar, FOOBAR, FOObar, etc. used interchangeably, that's not gonna help readbility and maintainability.
Obviously just trying to appeal to THE COBOL MAFIA
Maybe that's the natural part, multiple ways to say the same.
> select "std"
a = readln()
show a
I hate the usage of strings here. I think it's important to distinguish between strings and symbols. It makes about as much sense as conflating strings and numbers. String is an abstraction overload well past it's breaking point.
I hate the usage of strings here. I think it's important to distinguish between strings and symbols. It makes about as much sense as conflating strings and numbers. String is an abstraction overload well past it's breaking point.
In Lua, a symbol is just a string which is subject to certain parsing constraints by the interpreter.
One of my favourite things about the language in fact.
One of my favourite things about the language in fact.
I mean, pretty much all code is just strings subject to certain parsing constraints by the compiler/interpreter/lexer. What GP is talking about is semantic difference, which is super important in programming.
Isn't the difference just mutable vs immutable?
Well strings in various languages are immutable in many programming languages so that's not it.
In strings I'd say the _content_ matters. If the value needs to be preserved at runtime that is a string, if after compilation the value doesn't, it's only used for binding at compilation time then it's a symbol. So, semantic litmus test I'd propose: if you search and replaced the value and recompiled, would you notice?
In strings I'd say the _content_ matters. If the value needs to be preserved at runtime that is a string, if after compilation the value doesn't, it's only used for binding at compilation time then it's a symbol. So, semantic litmus test I'd propose: if you search and replaced the value and recompiled, would you notice?
uhhh... no? The difference depends on the language, but really it boils down to semantic meaning behind certain strings. x == y has different semantic meaning than "x == y" but both are literally strings of text.
Why are strings overloaded past their breaking point?
There seems to be some interest, so this isn't the best written, but here you go:
Strings are too flexible. They can be used for anything and there should be semantic guard rails to types. Just like you never actually need booleans and enums, you could just use integers for both of those. I have seen developers instead of use strings instead of lists and just comma separate them. Strings are just a collection of characters with no restrictions to them. If you are going to add restrictions make them something else, create a better abstraction. I mean you wouldn't make a database just be nvarchar even if you could, because you aren't capturing semantic intent. Symbols do not have to be preserved at runtime, but do need to align during compilation. I mean should you be able to do string concatenation on a string in an import statement? How about to upper-case on it. If it doesn't behave like a string then it shouldn't look like one.
Strings are too flexible. They can be used for anything and there should be semantic guard rails to types. Just like you never actually need booleans and enums, you could just use integers for both of those. I have seen developers instead of use strings instead of lists and just comma separate them. Strings are just a collection of characters with no restrictions to them. If you are going to add restrictions make them something else, create a better abstraction. I mean you wouldn't make a database just be nvarchar even if you could, because you aren't capturing semantic intent. Symbols do not have to be preserved at runtime, but do need to align during compilation. I mean should you be able to do string concatenation on a string in an import statement? How about to upper-case on it. If it doesn't behave like a string then it shouldn't look like one.
I also don't know why. But I like the wording. This can be a new meme for programming language afficionado-skeptics: feature [...] is overloaded past its breaking point. Sent to the demi-gods at the meme ™ registrar office.
I see Dragon and Dragon Native:
https://dragon-lang.org/
https://native.dragon-lang.org/
What is the difference?
Is Dragon open source or free software? I see the MIT license at the bottom of this page: https://dragon-lang.org/introduction
"Tip The language is ready for production!"
Where is it being used in production?
How does Dragon perform compared to Python, Java, C#, or Rust?
Why should I choose Dragon over other programming languages?
https://dragon-lang.org/
https://native.dragon-lang.org/
What is the difference?
Is Dragon open source or free software? I see the MIT license at the bottom of this page: https://dragon-lang.org/introduction
"Tip The language is ready for production!"
Where is it being used in production?
How does Dragon perform compared to Python, Java, C#, or Rust?
Why should I choose Dragon over other programming languages?
To answer your first question, it looks like dragon-lang works on the JVM, whereas native uses LLVM. Seems to be some small differences in what modules need loading too.
But yeah, without seeing any "real" code written in Dragon, makes it very hard to evaluate its ease-of-use.
But yeah, without seeing any "real" code written in Dragon, makes it very hard to evaluate its ease-of-use.
Because the page seems to be down: https://web.archive.org/web/20230307140530/https://dragon-la...
It doesn't look like it has something that differentiate it from other languages and the main page I feel also doesn't sell it very well
It does say that it offers "features that enable the programmer to create natural interfaces and declarative domain-specific languages in a fraction of time" but I'm not really sure what features it's talking about
The robot module does seem to be a cool library and I like that it has IOT "by default"
It doesn't look like it has something that differentiate it from other languages and the main page I feel also doesn't sell it very well
It does say that it offers "features that enable the programmer to create natural interfaces and declarative domain-specific languages in a fraction of time" but I'm not really sure what features it's talking about
The robot module does seem to be a cool library and I like that it has IOT "by default"
Where is the github/gitlab/bitbucket link?
Where is the source to even look what it does and how it does?
Also, from the wikipedia page
Some things that Dragon is often used for are:
Desktop applications development Internet of Things programming Android applications development Web applications development
Not one example or libraries provided on how it does that. Because the inbuilt packages for sure do not have many integrations, which make many of things possible in the usecases above. The website and Wikipedia page look pure marketing rather than any useful info. Is this just a DSL that calls native libraries of JVM or C??
Some things that Dragon is often used for are:
Desktop applications development Internet of Things programming Android applications development Web applications development
Not one example or libraries provided on how it does that. Because the inbuilt packages for sure do not have many integrations, which make many of things possible in the usecases above. The website and Wikipedia page look pure marketing rather than any useful info. Is this just a DSL that calls native libraries of JVM or C??
Looks like Python. What are its core features that improve it over it's "inspired by" languages?
It's more of a mashup of Ruby, Lua, and JS to my eyes, and its syntax makes some mistakes at first glance that any C-inspired language shouldn't be making these days, such as the "dangling else". It looks like it could really do with Go- and Python-style namespacing of imports.
Yeah, I'm not seeing anything super compelling here beyond what, say, Lua can do, but I'm willing to be proven wrong.
Yeah, I'm not seeing anything super compelling here beyond what, say, Lua can do, but I'm willing to be proven wrong.
> In Oct. 2016 I started the design and the implementation of the Dragon programming language. After 15 months of development, In Jan 2018 the language Interpreter and environment were ready for use!
This shows just how much a labour of love the development of a programming language is.
This shows just how much a labour of love the development of a programming language is.
I wonder if its name was inspired by the “Dragon Book” of compiler design.
https://suif.stanford.edu/dragonbook/
https://suif.stanford.edu/dragonbook/
[deleted]
According to the docs (https://dragon-lang.org/documentation#loops), loops may but do not have to use curly brackets around the body (it would seem they use C-style and Lua-style interchangeably).
I can't imagine the reason why would a language designer make this choice, but I would love to hear about it.
I can't imagine the reason why would a language designer make this choice, but I would love to hear about it.
I love to see all these new languages coming in with some form of pattern matching. I know some people don't like it but I also am partial to allowing the omission of curly braces in loops/conditionals/etc.
That said, the pattern matching syntax is a little strange and stood out to me. Why does [a::b::c] match an array with three elements? Why does (true, false) match an array with two booleans?
That said, the pattern matching syntax is a little strange and stood out to me. Why does [a::b::c] match an array with three elements? Why does (true, false) match an array with two booleans?
I upvoted only because I thought about this: https://news.ycombinator.com/item?id=35057589
Not case sensitive.
What purpose does case sensitivity in a programming language serve?
Why would I ever need foo, Foo, and FOO to refer to completely different things?
Why would I ever need foo, Foo, and FOO to refer to completely different things?
'f' and 'F' are different characters in ASCII, Unicode, or whatever. You have to go out of your way to make them refer to the same thing, and since casing isn't one-to-one for every character, you have to have arbitrary rules: should 'ss', 'SS', and 'ß' be treated interchangeably everywhere?
VHDL, for example, is case insensitive. This means that if I have a simple architecture with a single FSM, and I define a type and a signal for the FSM state like this:
architecture impl of SimpleModule is
type State is (Idle, Busy, Done);
signal state: State;
begin
...
end;
I get an error message for the signal declaration, because the identifier state is already used for the type State. It's easy to fix (for example, using FsmState and fsm_state), but it's just so annoying each and every time.Because naming conventions are important for code reability.
When I look at a piece of code and I see something like "FOOBAR" I can be quite sure that I am looking at some variable in the global namespace. "FooBar" is most likely a class/struct. `foobar` could be a local name or a function.
Sure, these are conventions and don't need to be observed technically, but they are, because they are useful, same as it's useful to name counter variables in loops "i" instead of "localLoopIterationCounterVariable".
Oh and of course there are languages where case actually does matter syntactically, like Golang.
All of that flies out the window in a language that simply ignores case. And it is at this point where I pose the counter-question: What makes ignoring case in a programming language useful?
When I look at a piece of code and I see something like "FOOBAR" I can be quite sure that I am looking at some variable in the global namespace. "FooBar" is most likely a class/struct. `foobar` could be a local name or a function.
Sure, these are conventions and don't need to be observed technically, but they are, because they are useful, same as it's useful to name counter variables in loops "i" instead of "localLoopIterationCounterVariable".
Oh and of course there are languages where case actually does matter syntactically, like Golang.
All of that flies out the window in a language that simply ignores case. And it is at this point where I pose the counter-question: What makes ignoring case in a programming language useful?
done today on python
someMock = SomeMock()
Also, inconsistency. The example that they put is SHOWLN and showln, and they use all over the place showln, but then they write ReadLN. Driving me cranky :-)
someMock = SomeMock()
Also, inconsistency. The example that they put is SHOWLN and showln, and they use all over the place showln, but then they write ReadLN. Driving me cranky :-)
Grep-ability for one. This would also make Vim's default '*' behavior less useful.
Weird choice, I've programmed in a language that wasn't case sensitive and it's no fun to read legacy code where the casing changes everywhere.
function Foo.bar(foo, foo_param)
foo.buxx = foo_param or FOO
return foo
endAren't a host of the more popular languages case sensitive (C, C++, Java, Python, etc.)?
I think case sensitivity in a language, or a shell, is a mistake; but I'm outnumbered 100 to 1 by people who want it.
And why do you think that?
'a' and 'A' are two different code points. The computer doesn't care about our cultural notation that they are two somewhat-related things. One is `1100001` the other is `1000001"
Therefore they mean, and should mean, different things.
'a' and 'A' are two different code points. The computer doesn't care about our cultural notation that they are two somewhat-related things. One is `1100001` the other is `1000001"
Therefore they mean, and should mean, different things.
Hard pass.
Just another programming language? Is it open-source? Any performance stats to compare w/ other languages. :/
Does the world need another statement-based language? Surely expression-based is the way to go now
From the syntax is sounds like it's just Lua with extra steps.
i think jquery coined the phrase "Write less do more"... might want to get a new one.
Maybe "The modern way to write TypeScript"?
https://native.dragon-lang.org/documentation/variables.html
https://ring-lang.github.io/doc1.17/variables.html
*Edit: It's worth pointing out that some of the keywords have been changed ('see' has been changed to 'show', for example) but it's basically the same language.
*Edit2: This isn't made by the same creator as Ring, but it was inspired by Ring and uses many of its conventions. It appears to be a direct copy from what I can tell. There's a post in their Google group that mentions it was created by a student in India:
https://groups.google.com/g/ring-lang/c/Rqm4jI_TV1s/m/SmWL7r...