11 ms·
The Dragon Programming Language
- tomrod 4y agoLooks like Python. What are its core features that improve it over it's "inspired by" languages?
- talideon 4y agoIt'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.
- thesuperbigfrog 4y agoI see Dragon and Dragon Native: https://dragon-lang.org/ https://dragon-lang.org/ https://native.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 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?
- undecisive 4y agoTo 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.
- mughinn 4y agoBecause the page seems to be down: https://web.archive.org/web/20230307140530/https://dragon-lang.org/ 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"
- Pet_Ant 4y ago> 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.
- samatman 4y agoIn 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.
- packetlost 4y agoI 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.
- onlyrealcuzzo 4y agoIsn't the difference just mutable vs immutable?
- packetlost 4y agouhhh... 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.
- Pet_Ant 4y agoWell 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?
- MiyamotoAkira 4y agoNot case sensitive.
- JoachimS 4y agoHard pass.
- lockhouse 4y agoWhat purpose does case sensitivity in a programming language serve? Why would I ever need foo, Foo, and FOO to refer to completely different things?
- pcvonz 4y agoGrep-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.
- samatman 4y agofunction Foo.bar(foo, foo_param) foo.buxx = foo_param or FOO return foo end
- sigzero 4y agoAren't a host of the more popular languages case sensitive (C, C++, Java, Python, etc.)?
- adwn 4y agoVHDL, 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.
- 4y ago
- voodoochilo 4y ago[dead]
- selectnull 4y agoAccording to the docs (https://dragon-lang.org/documentation#loops 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.
- dom96 4y ago> 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.
- lockhouse 4y agoI wonder if its name was inspired by the “Dragon Book” of compiler design. https://suif.stanford.edu/dragonbook/ https://suif.stanford.edu/dragonbook/
- usrbinbash 4y ago> 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: 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?
- croes 4y agoMaybe that's the natural part, multiple ways to say the same.
- mr_00ff00 4y ago> 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”
- Y_Y 4y agoObviously just trying to appeal to THE COBOL MAFIA
- qwertfisch 4y agoBut 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.)
- deleted 4y ago[deleted]
- DangitBobby 4y agoI 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?
- hsn915 4y agoReally 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.
- cush 4y agoBut it says it's innovative!
- flykespice 4y agoIt's as innovative as hobbyists adding confetti (and other decorations) to a reinvented wheel.
- ElfinTrousers 4y agoInnovation and $2 will get you a cup of coffee, as long as you don't have fancy tastes in coffee.
- lopatin 4y agoEven 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.
- methods21 4y agoWith a name like this, I was hoping it would be perfect for writing compilers.
- n1c00o 4y agoI'm glad to have this reference lmao
- thrownaway561 4y agoi think jquery coined the phrase "Write less do more"... might want to get a new one.
- Yahivin 4y agoMaybe "The modern way to write TypeScript"?
- qainsights 4y agoJust another programming language? Is it open-source? Any performance stats to compare w/ other languages. :/
- anaganisk 4y agoWhere 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??
- replwoacause 4y agoThis is the same as ring-lang. Even the documentation is identical: https://native.dragon-lang.org/documentation/variables.html https://native.dragon-lang.org/documentation/variables.html https://ring-lang.github.io/doc1.17/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/SmWL7rv0BwAJ https://groups.google.com/g/ring-lang/c/Rqm4jI_TV1s/m/SmWL7r...
- asplake 4y agoDoes the world need another statement-based language? Surely expression-based is the way to go now
- eimrine 4y agoI upvoted only because I thought about this: https://news.ycombinator.com/item?id=35057589 https://news.ycombinator.com/item?id=35057589
- Zondartul 4y agoFrom the syntax is sounds like it's just Lua with extra steps.