Slashdot Mirror


Concept Programming

descubes writes "A recent article asked about improvements in programming. Concept programming is a very simple idea to improve programming: program code should reflect application-domain concepts. What is amazing is not the idea itself, but how often we don't apply it, and how much existing tools and techniques can get in the way without us even realizing it. To be able to represent all concepts equally well, we need tools that don't force a particular, restricted vocabulary on us. The Mozart project is a Free Software project to implement concept-programming development tools. It includes the Coda universal intermediate language, the Melody persistent program representation, the Moka Java-to-Java extensible compiler, and a fairly advanced front-end for a new programming language called XL. In the long run, Mozart can give the Free Software community a foundation for something as powerful as Charles Simonyi's Intentional Programming."

5 of 78 comments (clear)

  1. Good idea - no need for new tool gimmickry by Anonymous Coward · · Score: 2, Insightful

    I apply this principle all the time.

    I write lisp macros, essentially extending the language and customising the object system to incorporate the domain-specific concepts, rolled into a package.

    It's the way many forth coders work too, BTW.

    I find it interesting that lisp, coming from the really high-end and forth, coming from the really low end, feel so similar in this respect.

    1. Re:Good idea - no need for new tool gimmickry by aminorex · · Score: 3, Insightful

      > What Lisp or Forth lacks is: Apparently you aren't aware of the reader. This is one of many implementations of infix syntax support for any Common LISP.

      --
      -I like my women like I like my tea: green-
  2. Not very well-explained nor convincing by GusherJizmac · · Score: 4, Insightful
    The examples on the site of where Concept Programming results in a better solution, are quite contrived and not very convincing. They make Concept Programming out to be nothing more than a glorified bowl of syntax sugar (hold the types), and that's not always a good thing.

    The first example discusses the concept of "Maximum", and shows how you would implement that concept in Java, followed by the allegedly superior XL way to do it. The Java "class" makes no sense, and really would not be the way to go about it. YOu would never want to model the concept of Maximum in that way, but if you did, you would use the already-existing Comparable interface and creating a static method called "Max" of some class that takes a list of comparable objects.

    Furthermore, in C, you can model it exactly as they have, since C allows multiple arguments.

    The next example was discussing takinga derivative and how you can translate some incorrect Java syntax that takes a derivative into the Java equivalent. Why not write a method to do this? What is to be gained by using a non-standard syntax? It makes it harder to write (you have to learn something in addition to Java), and harder to read (same reason).

    As for the XL language, and the notion of Concept Programming, it just wasn't explained well at all, and left me saying "what's the big deal? What does this buy me? Where is a real example?" Not every program (dare I say not many programs) are based around mathematical equations and operations. Most involve executing some logic based on input and spitting out output. Modelling that as math seems really counterintuitive (and not in-line with the "concept" of your domain).

    Ultimately, seems like some typical academic wank-fest that someone can use to get their Ph.D., but not very applicable in the real world.

    --
    http://www.naildrivin5.com/davec
  3. trying to keep an open mind... by Hubert_Shrump · · Score: 2, Insightful

    from the justification:
    Projects fail not because of language defects, but because people insist on using the wrong tools. Projects succeed when people use the right tools, not because of the features of these tools.

    I'm not against this point of view, because I have problems thinking for myself ;) ...
    Isn't this the idea behind a rich OS, like a *nix?

    I have all these languages to choose from, that I can glue together many different ways... I don't have to nail myself to A solution, and thereby A drawback.
    I can get the drawbacks of everything, all at once!

    Maybe I'm sadistic, but I like having a lot of tools in my toolbox. I like that if I don't understand a concept in a language, I'm not shut out of the programming flock forever.

    I knew I should have just posted something funny and hung up. Coffee...

    --
    Keep your packets off my GNU/Girlfriend!
  4. Shark Sandwich by ENOENT · · Score: 3, Insightful

    So, how will introducing the concept of "concepts" make it any easier to write code? I have no concept of how the concept of concepts will help me to conceptualize programming concepts. A class might be a concept, a function might be a concept, windshield degradation on your racing simulation might be a concept... It appears that that "concept programming" is just a fancy way of talking about waving your hands in the air.

    From the REALLY LIMITED amount of information about "concept programming" on the linked site, it appears that the author REALLY REALLY wants to use higher-order functions (a la Scheme or Haskell), but he just doesn't know it.

    --
    That's "Mr. Soulless Automaton" to you, Bub.