Thread overview
IMP - another Martian D effort?
Oct 01, 2002
Mark Evans
Oct 02, 2002
Walter
Oct 02, 2002
Mark Evans
Oct 02, 2002
Walter
Oct 03, 2002
Mark Evans
Oct 03, 2002
Rene Rivera
Oct 03, 2002
Mark Evans
October 01, 2002
I just had to post this because of IMP and because of their Mars theme. ;-) Is IMP the same type of language as D?

http://www.redshift-software.com/ http://implanguage.com/docs/Intro.html

"IMP is low level, imperative programming language intended for approximately the same kind of tasks that C was originally designed for i.e. system programming, tools, and moderate sized applications. IMP's  design goals are pretty much as follows:

A consistent syntax. Simplicity Small Language Size Sufficent power to build an Operating System Generality Features deliberately unlike other languages"

Mark


October 02, 2002
Imp has similar goals, but the result (if you look at the syntax) is very different. It also appears to have been abandoned.

"Mark Evans" <Mark_member@pathlink.com> wrote in message news:and7r7$2abq$1@digitaldaemon.com...
> I just had to post this because of IMP and because of their Mars theme.
;-)
> Is IMP the same type of language as D?
>
> http://www.redshift-software.com/ http://implanguage.com/docs/Intro.html
>
> "IMP is low level, imperative programming language intended for
approximately
> the same kind of tasks that C was originally designed for i.e. system programming, tools, and moderate sized applications. IMP's  design goals
are
> pretty much as follows:
>
> A consistent syntax.
> Simplicity
> Small Language Size
> Sufficent power to build an Operating System
> Generality
> Features deliberately unlike other languages"
>
> Mark
>
>


October 02, 2002
I got that impression too.  I told them about D.  They have some good ideas. More importantly, they dig Mars.

Mark

In article <andle5$2o1r$1@digitaldaemon.com>, Walter says...
>
>Imp has similar goals, but the result (if you look at the syntax) is very different. It also appears to have been abandoned.
>


October 02, 2002
"Mark Evans" <Mark_member@pathlink.com> wrote in message news:andm1f$2oj7$1@digitaldaemon.com...
> More importantly, they dig Mars.

Lot of that going around <g>.


October 03, 2002
One thing worth reading about IMP (dead as it may be) is their commentary on semantics and syntax.  It is spot-on.

http://implanguage.com/docs/Intro.html

Mark

"A consistent syntax has similar semantics for similar structures and different semantics for different structures. Unfortunately, most programming languages violate this simple concept in a number of ways. C, for example, has constructs that have different semantics for similar syntax and multiple syntactic forms with the same semantics. The static keyword is an example of the first case, since it can restrict the scope of a variable or function, or it can specify that a variable's storage is not allocated on the stack (and therefore survives from one function call to another). On the flip side C has not one, but three different ways to dereference a pointer. (using *,[], and ->) "



October 03, 2002
In article <ang37s$29dk$1@digitaldaemon.com>,
 Mark Evans <Mark_member@pathlink.com> wrote:

Sorry for my delay in response... had to take time to read about D before posting anything reasonable.

> One thing worth reading about IMP (dead as it may be) is their commentary on semantics and syntax.  It is spot-on.
> 
> http://implanguage.com/docs/Intro.html
> 
> Mark
> 
> "A consistent syntax has similar semantics for similar structures and
> different
> semantics for different structures. Unfortunately, most programming languages
> violate this simple concept in a number of ways. C, for example, has
> constructs
> that have different semantics for similar syntax and multiple syntactic forms
> with the same semantics. The static keyword is an example of the first case,
> since it can restrict the scope of a variable or function, or it can specify
> that a variable's storage is not allocated on the stack (and therefore
> survives
> from one function call to another). On the flip side C has not one, but three
> different ways to dereference a pointer. (using *,[], and ->) "


Wow... thanks for the quote. :-)

Guess I'll say some comments on the IMP language... as far as what's not on the web pages...

No the project isn't dead. It's in somewhat of a slumber because of time
constraints. It's just me and John working on the project. But currently
we are working on the Thot tool project. Just trying to keep bread and beer on
the table ;-)

We actually actively talk about the language from time to time but most
of that doesn't make it to the web site, again for lack of time. We also happen
to be discussing an object oriented counterpart to Imp.

The Mars theme I think is somewhat of a fabrication on your part ;-] Not that we don't like Mars, in fact we love it, but it has nothing to do with the language. The Mars theme comes from the "Mars Chronicles" game we are also working on (no public website for that yet).

As for the features and objectives of Imp as compared to D. I'd say that they are somewhat different, reagarless of actuall syntax. I think the most obvious difference is that D is trying to "fix" C/C++, but Imp is trying to replace what C was intended to do. We are specifically avoiding non-imperative language features. We want a language to use for writting things like device drivers, OS kernels, vector algorithms, etc. Things that C, as the current imperative systems language, has failed to provide.

I find it interesting you picked the above quote... It is probably the biggest gripe we have with C/C++ and many other languages. And is something that we think all new languages should strive to accomplish.

To highlight the quote and to give you a direct idea of how that applies in Imp I thought I'd translate the first sample program you have on the D documentation, the prime number sieve:

----
## Sieve of Eratosthenes prime number

SieveProgram:
{
    StdIO: import;
    Types: import;

    main: export routine (argc: integer; argv: &&char)(result:integer)
    {
        count: integer <- 0;
        flags: [8191]boolean;

        print(stdio.output,"10 iterations\n");
        loop iter : integer <- 1
        {
            count <- 0;
            flags <- true;
            loop i : integer <- 0
            {
                if on ([i]flags)
                {
                    prime: integer <- i+i+3;
                    loop k: integer <- i+prime
                    {
                        on (k < size(flags));
                        [k]flags <- false;
                        k + <- prime;
                    }
                    count + <- 1;
                }
                i + <- 1
                on (i < size(flags));
            }
            iter + <- 1;
            on (iter <= 10);
        }
        print(stdio.output,"\n");
        print(stdio.output,count);
        print(stdio.output," primes");
        result <- 0;
    }
}

SieveProgram: import;
----

This is as close to a transliteration as I can manage, some slight scoping differences, to make it easier for you to map to and from.

But the big difference is that there is only one kind of looping construct. And it can accomplish not only what "for", "while", and "do-while", but considerably more with simpler semantics than any of them.

OK, that's enough rambling on my part...

Enjoy.

PS. Mark, didn't I see your posts in the Python C++/Boost.Python list? Just curious if my posts there are how you found out about Imp.

-- 
-- grafik
-- Don't Assume Anything
October 03, 2002
Rene,

That's a pretty good assessment of D.  I wish it had more of IMP's goal, wholesale replacement of the bad stuff in C/C++.

I posted your nice summary of C's design flaws for that reason.  It connects directly with recent discussions on this list.  C began life as a kind of Unix geek hack that just grew out of its britches. We have been suffering ever since.

While I argue that D should adopt high-level constructs from STL and script languages, I still want the low-level bit twiddling of a systems language. Recently we had some postings about D and embedded systems.

C syntax needs to be cleaned up and am glad to see someone doing that. Personally I don't mind living with legacy C syntax if the inconsistencies are removed and the semantics repaired.  D could do that, but there is a strong desire to migrate C/C++ folks seamlessly, which raises the resistance level to better language constructs.

One thing both IMP and D share in common is a desire for maximum performance and there have also been some discussions about that lately too.

The D folks are also talking about iterators now which connects directly with the looping issue, a rather novel thing in IMP.

The web interface to the D newsgroups permits sorting by date, author, and other fields.  If you use my name as the key then you can read through various threads in which I have participated. That should give you some idea of my thinking.

I don't recall exactly how I discovered IMP.  Please put some of these philosophy and mission statements on your web site.

Yes I have used Boost Python Library since it began and keep up with the C++-sig.

By all means keep rambling to us. I hope that you will contribute ideas to D even if you keep working on IMP. I think your ideas are sound and long overdue.

Mark