Become a fan of Slashdot on Facebook


Forgot your password?

Dao, a New Programming Language Supporting Advanced Features With Small Runtime 404

New submitter NeoHermit writes "This language (Dao) has never been mentioned on Slashdot before, but it might be interesting to many people here. As it has recently become feature-complete and just made its first beta release, it may be the right time to mention it here. Dao is an optionally-typed programming language that supports many advanced features with a small runtime. The feature list is probably as long as that of Python, but they are supported by a much smaller runtime (somewhere between Lua and Python, but closer to Lua). Besides optional typing, the other major features that worth mentioning include: built-in support for concurrent programming for multicore computers, very friendly C programming interfaces for embedding and extending, a LLVM-based JIT compiler, a Clang-based module for embedding C/C++ codes in Dao, and a Clang-based tool for automatic binding generation from C/C++ header files. You can also see many familiar features from other languages."
This discussion has been archived. No new comments can be posted.

Dao, a New Programming Language Supporting Advanced Features With Small Runtime

Comments Filter:
  • by antifoidulus ( 807088 ) on Tuesday May 28, 2013 @11:14PM (#43846917) Homepage Journal
    It's basically Go with fewer features, next!
    • You must be joking! Dao has almost all the major features that Go has, not vice versa. Just mention a few: tasklet (goroutine in a different form), channel, defer, defer-recover, interface etc.
      • FYI, your Documentation link in the beta release announcement just jumps back to the beta announcement.
      • by Anonymous Coward on Tuesday May 28, 2013 @11:54PM (#43847105)

        Dao (and Go) do not solve programming problems better than other mainstream alternative languages. Seriously, I looked through the list and asked myself what Dao could do that (say) C, C++, Java, Groovy, Scala, Clojure, or Haskell couldn't do, and I couldn't come up with anything.

        If someone is really interested in solving programming problems using language design, I need a language that satisfies the following:

        a) Object-oriented, when I want it. Not the C++ bullshit of multiple inheritance, but Java's OO model isn't bad as a start; maybe add Scala's mixins and traits as well to that.
        b) Functional, when I want it. But not Scala-functional: more like Haskell or Clojure functional.
        c) Strongly-typed, most of the time. When I'm solving specific domain problems, I want the type system to ensure I'm not jamming a Foo into a Bar.
        d) Optionally- or non-typed, once in awhile. Sometimes I'm just writing an algorithm that should be able to deal with any sort of object and don't care what the underlying object is. Java's generics are ok, but sometimes they just get in the way.
        e) Reasonable concurrency model - message passing, threads, actors, producers, consumers, event buses, etc.
        f) Garbage-collected. I used to do malloc()/free() and new/delete, but I'd rather have the underlying language handle objects for me. (That isn't to say that I don't care about memory pressures - I'm ok with allocating objects once and tracking their state instead of allocate/release/garbage-collect thrashing.)
        g) Proper closures and exception handling in the OO part. (Closures and monads should be part of the functional part of the language).

        Note to Scala crazies: the above may LOOK like Scala, but it sure as hell isn't Scala. No one in their right mind would develop something that had to be maintained in Scala, because part (h) that I don't want is this: arbitrary operator definition and overloading. That right there makes Scala a total disaster. For an example of this, see the Lift examples.

        • Re: (Score:3, Insightful)

          by Anonymous Coward


        • I suspect you might want O'Caml semantics with a more modern syntax.

        • Re: (Score:3, Informative)

          by gigaherz ( 2653757 )
          Check C# 5.0, it meets most of the requirements in some form or another. Lambdas, Linq's meta-expressions and dynamic runtime allow for something rather close to functional and untyped code, the Generics are much nicer than java's and THe major feature of C# 5.0 is the async keyword for concurrency.
        • by devent ( 1627873 )

          You should look more in Groovy because that is basically the feature set of Groovy.

        • f) Garbage-collected. I used to do malloc()/free() and new/delete, but I'd rather have the underlying language handle objects for me.

          What is this language of which you speak that requires new/delete use and does not manage memory for you. It sounds suspiciously like C++ circa 1995, but I can't see why anyone would be doing that in 2013.

          BTW: C and C++ actually can work with a garbage collector, it's just that support is not built into the language. GCC, for instance was a very large C program using the Bohe

        • For your part h), see also SBT, the Simple Build Tool for Scala, with operators
          Items I think you're missing:
          i) REPL for rapid exploration of language features.
          j) If the language is compiled, fast compilation times. This to me is a massive reason to prefer Go and D [] to C++ when you're building something that has to be near C++ for speed but does not need to hook deeply into existing C++ code.

          I also disagree on your need for strong static typing. Let's say you have some kind of object with function
      • You must be joking! Dao has almost all the major features that Go has...

        Maybe this is a Whoosh! moment for me (it is late and I'm getting sleepy), but isn't your comment the same thing the OP said, just in another format? Yet you seem to be disagreeing with him?

  • If not, then it is just another fail, as functional programming styles are not supported. From the web-page, it seems it is indeed just another failure.

    If they had either, it would be a significant step in the right direction. Optional typing is definitely highly desirable.

    • by Anonymous Coward

      Have fun designing programs that manipulate massive amounts of state with functional programming style. Given that nobody has figured out how to do a first person shooter with a functional langauge, makes me suspect that they aren't the one answer to every problem. In fact even a relatively simple game is quite awkward [] in a functional style.

      I guess you can't solve every problem with lambda calculus and retain your sanity.

      • There actually is a Haskell FPS []. State manipulation is a little awkward in some ways, in part because there isn't a universally agreed-on way to do it, but the tools are getting better. With lenses on top of a State monad, things start to look pretty similar to an imperative language, except that you get the benefits of functional programming as well (for instance, error handling is a lot easier when you don't have to back out a bunch of changes because you still have your original state lying around).

    • Re: (Score:3, Interesting)

      by NeoHermit ( 2899437 )
      Tail-recursion: yes; Lazy evaluation: no. It does support some functional programming styles, at least as much as python or ruby supports. It's just that it is not branded that way. But if you are looking for a programming language that supports functional programming as its major programming paradigm, this is not the language you want. But certainly this is not the reason to dismiss it as failure.
    • by Greyfox ( 87712 ) on Wednesday May 29, 2013 @12:38AM (#43847319) Homepage Journal
      Optional typing is not highly desirable. Everyone got all starry-eyed when they talked about how object oriented programming would allow you to have a container of objects and you could just put any arbitrary object into the container. Which is a great idea as long as you don't really think about it. Eventually you have to know what kind of object you're holding and you actually to use it to do some real work. The same thing goes for functional programming. Eventually you need to know what kind of data you're operating on, and you actually have to operate on it to do some real work. When the time comes to do some real work, you quickly realize just how much of a mess optional typing makes of your program.

      I've looked at a lot of code over the years that pushes the actual work to be done around like a two-year-old pushes peas around a plate. I've gotten to the point where I can read the mind of the programmer through the code he's written. He's thinking "If I push this over here maybe it will magically go away and I won't have to deal with it." Most of the time this is because he doesn't actually understand the business logic behind the code he's writing. He's writing to a series of requirements but he has no understanding of why the requirements exist or how they drive the business. So he tries to keep his code abstract as possible and hopes that no one notices.

      Sadly no one has yet written a language that forces you to actually understand the problem domain that you're coding. I'm sure it wouldn't be very popular if anyone ever did. Neither has anyone actually managed to write a language that allows you to write useful code without understanding the problem domain, and no one ever will. Now if someone could write a language that a non-programmer who understands why he needs code written to describe what needs to be done directly to the computer, that might fundamentally change my job description. Given that most of those people obviously can't even express this to another human being (Judging from their requirements docs,) I'm not losing any sleep over it.

      What the people who flit from language to language or framework to framework like bees are looking for is a tool that allows them to write code without understanding a problem. Someone who actually understands the problem will always outperform them in any given language. In other words, just because your language has an expressive syntax or any specific feature doesn't mean you can hire chimpanzees to code your application.

      • Optional typing is not highly desirable.


        Strict typing a la Algol requires you to write more code (in the form of type declarations). Strict typic a la ML requires someone to write more compiler, which isn't a problem if you're shipping compiled code, but in a typical scripting scenario it requires there to be more compiler in your runtime and (more importantly) slows load time.

        Dynamic/optional typing requires you to write more tests (unless you want less robust code, of course), but tests typically do

      • Two people who understand the problem, one with five tools in his belt, the other with one. The first guy is going to get the most return on his investment, the second guy will always have work.

        Let's not waste time on the chimpanzees.

      • ventually you have to know what kind of object you're holding and you actually to use it to do some real work.

        I agree.

        Fundementally all a computer does is manipulate data. The type of the data is the only thing that defines which maniuplations are possible and meaningful. If you aren't thinking about the types, then there is nothing you can do.

        Of course, no one wants to be caught up in irritationg games to satisfy the compiler. This is why I really *really* like the look of concepts (and C++ templating whi

  • by ThePeices ( 635180 ) on Tuesday May 28, 2013 @11:39PM (#43847043)

    So if Dao is optionally typed, what are the other programming input options? Voice input? Graphical point n click input?

  • Why would someone want to use this language instead of an established language? So there is a feature list. Is there something there that is compelling enough to leave an established language community?

    A language alone has little value. It's the community / ecosystem that makes it worthwhile.

    • New languages are the proving ground for new programming language features and implementation technologies. Right now, Dao doesn't nee people to make it mainstream, it needs people to see how that feature set and implementation technology works in practice.

      • So what's so standout about the feature set and/or implementation technology? TFS and a quick read of the linked feature list doesn't make anything jump out at me.

        • I have no idea. I was speaking generally about why we need new languages even if they're never adopted for serious project.

    • You have to start somewhere.
    • by pmontra ( 738736 )

      I'm back from a trip on my time machine. I was in the 60's and I heard someone at Bell Labs arguing "why would someone want to use this C language instead of what we already have?" Don't worry, I didn't tell him what was about to happen.

      On a less funny note, people experiment and throw languages at us. Java, JavaScript, Perl, Python, Ruby were not established 20 years ago. Actually only two of them already existed at that time. Countless other languages came and died but nobody was able to predict which one

  • How about zero!

    WTL is an open-source C++ framework for creating Windows applications that typically require no installation, no runtime whatsoever, and generally compile to an exe less than 100K in size!

    • Even C doesn't have a zero-sized runtime.

      $ ls -l /usr/lib/crt1.o
      -rw-r--r-- 1 root wheel 10104 22 Mar 17:44 /usr/lib/crt1.o

      • You are, of course, correct. WTL, however, does not require any runtime library beyond what is included in the OS.

      • by AuMatar ( 183847 )

        Wow, you mean the firmware program I wrote least week that went on bare metal had a runtime?

        Try again.

        • Unless the CPU transferred control directly to C code at boot time, without passing through any lower-level initialisation first, then it had a runtime.

          But even that is no guarantee. Some implementations of C provide enough support for low-level hackery that they allow you (or the vendor) to write the runtime in C itself, including setting up the stack pointer. I've certainly done that before. It's possible, but it's rare.

          • by AuMatar ( 183847 )

            Yes, it did. Thats the way most firmware works. Even those projects with an embedded OS end up working like that, unless you want to redefine runtime to mean an OS itself.

            • Not every C program needs every part of the standard C runtime, but I'd wager that every C program in existence needs the stack (which is why I keep talking about it). So the key question you need to ask is: Who sets up the stack?

              If it's the operating system (there are "linkable" operating systems, and operating systems which ), then the OS implements the runtime. If it's a piece of assembly code which then transfers control to C, then that is the runtime. If it's C code, then the runtime is (at least partl

  • by petteyg359 ( 1847514 ) on Tuesday May 28, 2013 @11:59PM (#43847139) Homepage

    "Yet Another Pissant Programming language". Can we quit pretending that "new is better" and just use the stuff that actually works?

  • ... is a programming language named D'oh!

  • Yet Another Programming Language
  • I thought the word that is pronounced "Dao" is spelled as "Tao", meaning "the Way". So, what is a "Dao"?
  • Dao doesn't seem to have "optional typing", it seems to have a choice between static and dynamic typing.

  • Could we have someone, maybe an editor, tighten up the summary a bit? Here's what I see:
    idea : # times it occurs
    "Let's mention this on /." : 3
    "It's done" : 2
    small runtime : 2
    features : 3 (plus that laundry list of actual features)

    Instead, let's try this:
    "The Dao language has recently made its first beta release, and we think you Slashdotters will Eff'ing love it. Dao is an optionally-typed programming language that supports many advanced features (probably as many as Python ) with a small runtime
  • Is a new language really what we were waiting for ? I seriously doubt it. Existing languages already do, or are capable to do, the most exotic things for us. I look at it from a software architect's viewpoint: what we need is not yet another language, we need new design and programming paradigms. Like, for example, people in the place I currently work for reacted enthusiastically upon the BDD ( Behaviour-Driven Design ) idea; most of the somewhat older engineers had never heard of it. We need new ways and s
  • by aaaaaaargh! ( 1150173 ) on Wednesday May 29, 2013 @05:02AM (#43848327)

    Okay, so here is my uninformed opinion and some free unsolicited advice ;-)

    First of all, some people here are just too defeatist. Yes, it looks a lot like Go and has only few exceptional features, but it's certainly not the worst programming language I've ever seen and e.g. seems to be overall better than Python - if we ignore, for the time being, the external library support which makes Python so great. I agree with others that optional typing is a bad idea, though. Many optimizations will be hard to implement in future and loose typing should be explicit (as e.g. in polymorphic types).

    Since I'm sort of a hobby programming language enthusiast, working on my own toy language in my spare time, there is one annoying thing I must mention, though. Why do so many contemporary language designers choose C-style syntax and not Algol/Pascal/Ada style? Just because they know C best? All of these C-clones, each of them with their own little quirks and specialities, don't really make the syntax more compelling or easier to read. (It would be okay if they behaved exactly like C, I guess, but then they wouldn't be languages on their own.) Why not go for block-style syntax or the Python wite space route instead?

    Take a look at Ada, for example. Yes, I know, the syntax is verbose and has to many double-uses of keywords. It is a bit archaic. However, on the bright side, Ada programs really are extremely readable. You can easily scan through GNAT's source code and understand how the packages work without looking at additional documentation! I'm not saying, "Hey, let's all switch to Algol-style syntax", and not everybody likes the way Python deals with white space either, but a little bit more variation would be nice.

    Which brings me to another issue. If you invent a new language, please make sure twice already in the design phase that it can be optimized later. Nothing is more annoying than an overall nice language that also becomes popular, only to turn out to be basically unoptimizable later. If a function has no side effects, if a data structure is immutable, if instructions or data structure traversals can be executed in parallel, please give us a way to indicate that within the language unless it can be inferred automatically. At least in theory, a new programming language ought to be capable of being as fast as C[1], Fortran, or Ada. Otherwise you could just save yourself lots of trouble and translate it to C++ or SBCL right from the start...

    Footnote [1]: To be taken with a grain of salt. Arguably, C is the the first in the list only because of extensive compiler optimizations not because of its language features.

    • by msobkow ( 48369 )

      Because {..} takes a lot less typing than begin..end.

      If people wanted to type excess verbiage, they'd stick with COBOL.

  • YABL. Come on, people, really?

    Unsafe arrays.

    Forced-indexing into arrays.

    Not interested.

  • by gestalt_n_pepper ( 991155 ) on Wednesday May 29, 2013 @08:04AM (#43848879)

    Not because it's a bad language. It may be great. The fact is that nobody... I mean *nobody* needs one more obscure little language whose wondrous new features would just be another add-in library in C++. This is a mental masturbation tool for the Mom's basement crowd. Nothing more.

Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off.