Related articles |
---|
Cooking up a new language and need suggestions stillman@pop.mindspring.com (1997-06-10) |
Re: Cooking up a new language and need suggestions christian.jakobsson@sesig.mail.abb.com (Christian Jakobsson) (1997-06-13) |
Re: Cooking up a new language and need suggestions bear@sonic.net (Ray Dillinger) (1997-06-13) |
Re: Cooking up a new language and need suggestions jkoss@snet.net (1997-06-13) |
Re: Cooking up a new language and need suggestions sam.ravnborg@image.dk (1997-06-15) |
From: | jkoss@snet.net |
Newsgroups: | comp.compilers |
Date: | 13 Jun 1997 22:06:21 -0400 |
Organization: | "SNET dial access service" |
References: | 97-06-031 |
Keywords: | design |
On 1997-06-10 stillman@pop.mindspring.com(CemKaran) said:
>I then tried to tell her a little of how programming works, but inside of
>a few minutes, she stated that that was too difficult that there must be
>an easier way.
We all know there is an easier way.. we just can't agree on one!
<grin>
>I was about to start to argue with her, when I suddenly realized that she
>was right; there probably was an easier way. And so, I've been spending
>the past while trying to think up how to make programming easier, in the
>process developing ideas for a new language.
>The first idea that I had is to solve a problem that I have when
>writing any sort of complicated math function; I almost always lose
>a paranthesis somewhere, and I have a difficult time of finding it.
As you pile on concepts you want to present efficiently, the limitations of
1-dimensional strings of text begin to show up.
>So make it a requirement that all paranthesis and brackets be autobalanced,
>except inside strings.
What do you mean by autobalanced?
One solution to "getting lost" in paranthesis is to remove them entirely,
and present the programmer with an interface that can denote operator priority
in another manner (presumably one that is less textual).
One such interface might present a tree to the programmer.
: -- c
: |
: -- / --|
: | |
: -- + --| -- x
: | |
: x <-- / --| -- x
: |
: -- 2 --( one iteration of newtons method )
aka:
x = (c / x + x) / 2; /* one iteration of newtons method */
The interface might be toggled, having several 'styles' useful for
different programming tasks.
>Next thing, have the computer automatically format mathematical
>functions as a person would write them, not as pure text. e.g.
>sin(x)/x*cos(x) would be more like
>sin(x)
>------ * cos(x)
> x
I would rather the format I write be the main format presented to me.
If the traditional style of mathematical notation isn't practical
then we should simply change the tradition. In a way this is actualy
what we have already done.
And by the way, shouldn't that really be...
: sin x
: ------- cos x ?
: x
jkoss@snet.net
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.