Computer: Programming Language
Language: Pseudo RapidWrite   (0)  [vote for, against]
New typesafe computer language without type input

[Edit] The following is a new detailed version of the idea [End of edit]
Changed name to Pseudo, after unique name had too many objections.

This is built from 3 parts.
1. A typesafe OO markup computer language:
eg. (just making this up for example)
<class name="elephant" scope="public" description"animated game component" author="pashute" created="1/1/2003" >
free text can go here
<property name="weight" type="integer">
<method type="GET"/>
<method type="SET" name="VARNAME"/>
</property>
</class>

2. A NON TEXT "WYSYWIG" editor. Here you don't see all the markup, but rather some way of showing the code in a marked editor. eg. The former text may be shown in a tree as follows: When I ask for show types
(C) Elephant
(pr) weight
(get) getWeight():int
(set) =(weight:int)

and when I look at the minimalized view I see
Elephant weight

Perhaps these "objects" will be shown in a "class browser" like interface, and then writing code visually in "snippets". But a better more flexible method is to have them in a "MS-WORD" like environment, so that classes, variables, methods and parameters are in certain distinguishable font size and color, and tooltip shows the full declaration, unless I ask to "unhide". Also a "properties" box would be a good idea for following the code.

The main point here is that you don't have to see all the typesafe and cluttered programming info, only the names of the variables/classes/methods and parameters when declaring them.

3. The ability to code into part 2 immediately without writing the class /method info, hinting at what needs to be done. You can have "code completion" on, but it could be done in stages. Stage 1 the vairable names. Stage 2: code completion of types and class/method/variable declarations.

Example:
You code:
elephant.weight = 5;
elephant.show();

stage 1: when you start writing "ele" it helps you complete to elephant.

stage2:
a. You click with your mouse the word elephant and in the properties you see that it is an class instance not initialized, of an unknown name (presumably Elephant). With one mouse click you can confirm/change these settings.

b. you press "program completion" and it offers elephant is a class instance so it shows the other classes that have a weight variable and a show() method, an in any case allows you to add a new class with that name.

Of course for GUI, a nice skinnable themeable GUI builder will be connected to this code making machine.

Current IDE's do not work this way, code is all in direct text, and your fingers hurt by the time you finished writing any sort of real code.

The product is: (A).a fast way to code so coders like it. (B) a strict language, so that it is easy to debug maintain and follow.
-- pashute, Aug 14 2003

Besides just spellchecking, it should also search for pairs of variable names that differ in only one letter. E.g. "lastmonthspremium" and "lastmonthpremium". These often represent errors.

And, it should search for nonparallel sequential lines of code, like:

Sales1 = Revenue1 + Interest1
Sales2 = Revenue2 + Interest1

This is likely the result of the programmer copying the first line and failing to change all the 1's into 2's.
-- phundug, Aug 14 2003


Don't IDE's do a lot of this? You can get MS Visual Interdev to correct mistyped variable names as you type, or have it suggest which to use if so desired (both can be at once very helpful and extremely annoying). Eclipse, Forte, JBuilder, Visual Cafe etc. will all create classes with class declarations and reduce what is needed to get the environment to compile. And Eclipse will highlight lines if you try to reuse a method name in any other context than overloading. I also don't see how a WISYWIG gui would make things easier. What happens if what I want from:

s = hello world

is to assign an array of characters, not a string to s? Or maybe the value of another variable? And can you imagine what the mark up could end up like if your string was itself a string of marked up text?

On the whole I'd have to frown, fold my arms, shake my head and go "hmm!"

(and what is Pesudo?)
-- custardlove, Aug 14 2003


Sorry all!! I love you people and your comments, I just wanted this to be a technical discussion, because its not a joke but rather a serious idea.

I'm also sorry I didn''t see this earlier, and fix it right away.

I will now change the entry as suggested, although probably little chance of getting any fixes to the rating. (thanks jutta)

As to the questions here I'll answer them in next notation, although chances are after such a mistake, this will never rise to where it was intended, and probably be deleted.... sigh.
-- pashute, Aug 14 2003


phundug - thanks.
ravenswood, sealorator: I pearl too.
The two differences are that I write even LESS then pearl, and then when I want to compile, I actually receive a C++/Java/C#/UnameIt program.
And it ISN'T automatically generated. It begins checking on all kinds of presumptions.

Just like human conversation, where you don't always understand the first time what people wish to say :-(

So the "1st stage compiler" actually is asking you: what did you mean when you said this or that.

Now, it may seem complicated to achieve, because a change from one text to a totally different text is needed, but not really so:

If most of the changes will be markup, and will be seen with some kind of "WYSIWYG" markup screen, it should be almost easy: (an XSL type mapping between two documents)

Then from the markup to change to formal language should be even easier. <hint>clr</hint>.

Po and beaux - thanks! ROTFL

Jutta - thank you for moving to "programing language". I dont know how I missed it after searching and scanning the COMPUTER section till finally I added LANGUAGE:

Pesudu is supposed to sound like Pseudo the way its mispronounced by some, and I thought it would be an interesting name, with a bit of uniqueness in our small global google village. Changed to Pseudo, after years of antagonizm because idea started off badly...

answer for custard in next anno.
-- pashute, Aug 14 2003


death - wow, I really am sorry if thats what you fealt. again, did NOT mean to offend anyone.

custard: Yes IDE's do correction of erroneous code, but I'm saying you shouldn't have to write code at all. You should be "telling" the computer what you want loosly. Once. Without being bothered. Without typing in all the class info, type info etc.

THEN

The computer should try to understand what you are saying and ask you what you meant.
In natural language it goes like this:
You say: "Please take the orange juice and put it back in the fridge." The computer (or ENIAC) says: "You mean this orange juice? The one that's on the table, dude?" If you answer "yeah" it says: Cool, dude. Consider it done. Now to our real example: If I wanted it as an array of chars, that will be one of the possibilities (since it is one of the more probable ways of understanding that sentance). I envision an MS-Word like editor with a wavy line under the s =. When I click the word, it opens a few possibilities: Variable: String, Variable: char array, Other: enter. I can continue on to next wavy line etc, or come back, until the program is marked up and understood, both by myself and by the computer.

It then produces the typesafe language code, which we programmers all know. But since the markup representation will be so intuitive and attractive, we will forget about it, almost like we forget about HTML tags, when using a truly good visual editor. (Example: when making a powerpoint presentation, show me someone who plays around with the html).

About what the markup will look like if is itself a string of markup: Nothing worse than the same in ASP/JSP and probably much better (like the @ does in c++). They HAVE developed some solutions for this in the passed XML years.

This programming environment and "language" could totally change the way programming is done.

And while we're at it: anyways all this sequencial stuff will blow away in the next 10 years, when real consiousness multiple (parallel version) distributed agent systems will evolve to maturity, and fuzzy connectionism will rule. But this way of "talking to the computer" will be the beginning.

C:\COMMAND>
-- pashute, Aug 14 2003


Knit one, perl two.
Dang, did I just say that out loud?
-- 2 fries shy of a happy meal, Aug 15 2003


I used to write programs, but manage others doing it now. Am I allowed to comment?

The problem with any kind of natural language programming is the inherent ambiguity of language. There are numerous examples, the nice one I read recently on IBD was "make me a star" and "make me a sandwich" (apologies to Mr De Groof). Now, I'm struggling to remember the idea, but it strikes me that to get to a point where you have an unambiguous stream of processing logic, the amount of verification required would be too much for anything less than the simplest of programs. Each of the examples above would require clarification.

For example, in [phundug]'s first anno, should Sales1 be Revenue2 + Interest1 or Revenue2 + Interest1? How would it know what to check until it had read the second line, and the possibilities for Sales2 are more complex.

"lastmonthspremium", "lastmonthpremium", "lastmnthspremium" - are they all the same, only some of them the same, or are they all different. The simple yes/no decision tree to even cope with possible typing mistakes is something that the human brain typically does much better - although I agree that IDE's could do a better job at picking out similarly named variables for attention.

Even the Perl examples are tricky - do you want to print i or do you want to print something else, or do you want to simply print an empty line or space?

[beaux] - do they? Now that *is* interesting.
-- PeterSilly, Aug 15 2003


For i = hungry
print i
next i
$ = -1
IF Power = OFF
ATM = OFF
i = hungry

(For blissy, who went hungry for a while during power outage)
-- thumbwax, Aug 15 2003


jutta, yes, please bring idea back.

was meant to be in annotation.

this is "bad luck idea."

i'de better delete it quickly.

All halfbakers invited to remark. I took my words back and beg your pardon!!!
-- pashute, Aug 18 2003


this whole idea is about saying "whoops that's not what i meant".
-- pashute, Aug 18 2003



random, halfbakery