What is useful from intentional and language programming?

Is there anything useful from intentional or "language oriented" programming?

This is not a rhetorical question. I'm looking for people who have tried these tools (i.e. presented programs at some "higher level" than plain text and used different editors for different subsets of the domain) and have some comments on how it was, or recommendations for a good instruments.

( Http://www.onboard.jetbrains.com/is1/articles/04/10/lop/ , What is intentional programming )

+1


source to share


4 answers


One very useful use is to make tests clearer, not only for the business analyst but also for yourself / your team.

When time has passed and you've forgotten what an exact test case is, LOP is very useful. You can have a BOM and even document the rules in the source code comments, but these artifacts are not enforced. The code is there!

You can also make the program very comprehensible, but more comprehensible than a language oriented description would be nearly impossible.

Consider this fictional snippet.

NOTE . Not that java is a LOP, but there are some structures whose purpose is to do something like the following, i.e. to make the test case simpler.

package a;
import static a.Help.*;

public class Test { 

    public void test(){
        Object value = "";
        Object obtained = "";
        assert that( expected( value , isEqualTo( obtained ) ) );
    }
}

      

This is a very simple example. The value in this code is the line that runs says what the test is:



            assert that( expected( value , isEqualTo( obtained ) ) );

      

This is very clear, it reads:

assert that the expected value is equal to the received

Ok, this is very simple. But you can have any business rule just by reading it literally.

customer bookmark request is processed when it reaches ... etc. etc.

Martin Fowler explains about this and mentions the Hamcrest framework for doing this.

Here's a link (I'm not entirely sure if this is where it talks about Hamcrest, or if this is another one: P sorry)

+3


source


The term "plain text" makes me want to here.

A language is a system of symbols with syntax, semantics, and meaning. It can take the form of keyboard clicks, mouse clicks, beeps, or any method capable of conveying information.

Its suitability is not a function of its mode of transmission, but the direct with which it is compared with the mental concepts that it uses to express.

A simple measure of this straightforwardness is found when you change your mind: how difficult is it to change the "code" without introducing an "error"?

Look at this.

ADDED: just by looking at Simonyi's stuff, maybe I can give an opinion on what's helpful in it.



On the negative side, I am not impressed with the emphasis that WYSIWYG and non-coding can build applications. People love pixels, especially colored moving pixels, especially if they are in California. Of course, something can be done in toy domains, but once you want to do your problem, you will be disappointed. This is an AI problem and worth working on. It is not fair to say that he is close to achieving this.

On the positive side, I wrote a book where I talked about the linguistic method, which is very similar to language oriented programming. I like to be based on theory, so I based my approach on Algorithmic Information Theory . It might sound daunting, but it's mostly about how to approach the most compact (but still meaningful) representation for items of information and includes programs.

I took the tangent from this. Instead of looking for compact programs (which are good), I was looking for the most compact stream of changes going from the human brain through the fingers / eyes to the computer. This applies not only to writing programs, but also to their maintenance during the life of the requirements.

I figured that basically if you are trying to minimize the maintenance edit flow, you are bound to improve the language to the point where it can be called domain. It is worth doing it aggressively and be prepared to swim against the popularity wave, because popularity keeps us going.

I have given a few examples, and I continue to give them, but first they are all practical, and in the second. These are ways to get specific assignments, but they don't go well with one of the vibrant gang stripes that programmers seem to crave.

As such, I really had no intention of spreading my horn because it is a waste of time, but perhaps I gave a little reason why language oriented programming I see would be useful.

+4


source


I'm not sure if this is what you are asking for, but after trying AppleScript a few times, I was very upset. There are so many ways to express something in English that it was very difficult for me to remember the syntax even for basic constructs.

I think good programming languages ​​seem natural, but it doesn't matter that you are constrained by structure.

0


source


It's just futur

With a high-level programming language, we've seen some pretty smart (but psychological, intolerant like me) guys start coding interesting tools because they've managed to focus on what, rather than programming.

With HTML, we saw that basic but mass communication becomes available to anyone with formal logic.

With the CMS, we saw that HR managers were able to quickly build a low-cost intranet and at a low cost.

With mashups, we've seen creatives create incredible services, including data transitions, geo-joining, and more, without having 1 / 100,000 of Microsoft's budget.

Every time you eliminate difficulties, you open a new door for people who do not have your abilities, but have others. You make your experience and take stock.

Tomorrow we will see Ms. and Mr. All coding without knowing it, some crazy stuff, because they need to see it. Things that you would never do because you are not.

Now it is true that we are very VERY from him because the tools are not good enough. But we're getting closer every year, and frankly, we'll see some improvement with the incoming Semantic Web ;-) The next step could be advanced natural language search or something like Ubiquity . And then who knows?

In the end, I agree with you: they are not very useful yet. The auto-generated GUI is not very good (quite useful for prototyping or small applications, but not very good when you want to "be in business"), natural programming is, let's say, limited ... But what you could do from a computer 20 years ago (mine was not even black and white, but black and green), and you will understand how promising it is.

0


source







All Articles