![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Professional Programmer
|
New Language Ideas
If someone were to create a brand new programming language, what ideas would you want to go into it? Are there features of other languages that you would want in it? Are there features that you thought would be great in another language, and that would be good in a new one?
Be as detailed as possible, and mention any ideas you'd like within bounds, from any other language, or brand new ideas never seen before. Let's make the best language ever!
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}Last edited by iignotus; May 14th, 2005 at 11:06 PM. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
something I would like is to have certain functions be declared as "value only" or something to that effect. These functions would treat all their pointer/reference arguments as const, and would not modify any statically-allocated variables. They couldn't be declared void, because that would be pointless.
These value only functions would also be able to be evaluated at compile-time if they were passed constant arguments! That way you could have something like this: value int square(int i)
{
return i*i;
}
const int squares[10];
for(int i = 0;i<10;i++)
{
squares[i] = square(i);
} |
|
|
|
|
|
#3 | |
|
Programmer
Join Date: May 2005
Location: England
Posts: 61
Rep Power: 4
![]() |
Quote:
I just felt like stamping on a dream today ![]() My ideal language would manage memory without need for the programmer to interfere much with it. Of course, I'd like to see something like setting memory areas as non-executable, to prevent against buffer overflows, but that's a feature closer to the OS and hardware than a compiler. I'd also like to see a nice, standardised API available to interact with basic features of many operating systems, such as GUI making etc. It'd make portability so much easier. Of course, that's just like writing a little wrapper to abstract API x of platform y into something usable by all. A lot of features I've asked for have been handled by dear old Python, but the main thing I'd like to see out of a programming language is something that's really optimised. Real power crunching code. Possibly optimised by the compiler itself (and I don't mean by omitting the frame pointer every so often). It'd kick ass to find a language for newbies also, that doesn't frighten people off, and isn't spurned by more veteran coders. In many cases, coding newbies don't know what to do. If there was only one universal resolution as to what the ultimate beginner language was, then it'd solve 90% of the newbie coding problems I see on forums. Alright, well that's my 2c.
__________________
http://www.nuticulus.net/hackmysig/sig.PNG Give my site a chance, you know you want to ;-) Google will solve 99% of your problems. Including those with your sex life. Caution, may <strike>contain</strike> be nuts. |
|
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
a function with optional parameters would be nice, something like this:
void person(string name, opt int age, opt int weight, opt string address)
{...}person("John"); // this is ok
person("John",,180); //name = john, weight = 180 |
|
|
|
|
|
#5 | |
|
Professional Programmer
|
Quote:
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;} |
|
|
|
|
|
|
#6 | |
|
Expert Programmer
Join Date: May 2005
Location: East Lansing, MI
Posts: 663
Rep Power: 4
![]() |
Quote:
I know there are ways arround this but having this feature would be neat ![]() Last edited by OpenLoop; May 15th, 2005 at 12:47 PM. |
|
|
|
|
|
|
#7 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Most languages (such as Python) support optional parameters like this:
(pseudocode)
function MyFunction (arg1, arg2 = "x", arg3, arg4 = 0):
... |
|
|
|
|
|
#8 |
|
Expert Programmer
|
I would create something like esperanto
![]()
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#9 |
|
Programming Guru
![]() |
a program which forces a certain notation style (eg curly braces in a specifi place tabbing )
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#10 |
|
Programming Guru
![]() ![]() ![]() |
Auto optimization for speed and resource management, extensive self-debugging, suggestive corrections, code repository, etc.
There was something pretty cool I saw in one of my magz. The "programmer" typed in the program "to the computer" as if it was having a conversation. Through logic deduction of what the "programmer" entered, the program generated source code.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|