Slashdot Mirror


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

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."

9 of 404 comments (clear)

  1. Re:you had me at... by Anonymous Coward · · Score: 5, Funny

    Someone better go dig Strousoup out because he ain't dead, yet.

  2. Optionally typed by ThePeices · · Score: 5, Funny

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

    1. Re:Optionally typed by Pseudonym · · Score: 5, Funny

      Surely I'd die of insanity before my conscience kicked in. Besides, "bind shoggoth" requires an import.

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  3. Re:There's a reason nobody talks about it by Anonymous Coward · · Score: 5, Interesting

    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.

  4. Re:you had me at... by dbraden · · Score: 5, Funny

    Sttroustrup ( you know youm could have gotten the name right )

    You sure you wanna be correcting folks?

  5. Re:Feature complete with a small runtime? by Pseudonym · · Score: 5, Funny

    The Dao that is feature-complete is not the true Dao.

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  6. Re:Do they have tail-recursion or lazy evaluation? by Greyfox · · Score: 5, Insightful
    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.

    --

    I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

  7. Re:you had me at... by Pseudonym · · Score: 5, Funny

    That's called "agile".

    --
    sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
  8. Re:There's a reason nobody talks about it by cyborg_zx · · Score: 5, Insightful

    That is what comments are for.

    No it isn't.

    Seriously I see stuff like this in legacy code all the time:

    // Add one to the iterator
    i--

    Comments lie, code doesn't. Someone is going to update the code and not bother with the comments.