My original (and current) plan is to design a language along the following lines:
Paradigm: Object Oriented, Imperative, Generic
Typing: Static, Strong, Reflective
High-level and Low-level functionality
Minimal primitive types (bit, byte, word, maybe double and maybe pointer)
Emphasizes and Encourages use of objects
Syntax based on C++ and C#
Pass-by-copy as default with pass-by-reference optional
Namespaces to minimize verbose variable names
Local Aliases for variables from other objects
The goal here was to make the language more consistent in definition, which I presume would shorten compile times, improve extensibility, and breed fewer eccentricities that programmers will need to consider. Here is an example I created based on a C++ code example:
include "corelib"
include "iostream"
using namespace std;
void main(ptr<int> argc, ptr<ptr<int> > argv)
{
cout << "Enter The Size Of Array: " << endl;
int size;
cin >> size;
int key, i;
array<int> arr[size];
// Taking Input In Array
for(i = 0; i < size; i++)
{
cout << "Enter " << i << " Element: " << endl;
cin >> arr[i];
}
//Your Entered Array Is
for(i = 0; i < size; i++)
{
cout << "array[" << i << "] = ";
cout << arr[i] << endl;
}
cout << "Enter Key To Search in Array" << endl;
cin >> key;
for(i = 0; i < size ; i++)
{
if(key == arr[i])
{
cout << "Key Found At Index Number : " << i << endl;
break;
}
}
if(i == size) cout << "KEY NOT FOUND" << endl;
}
As I viewed the code example in other languages, I began experimenting with the syntax. For the sake of consistency, I put a greater emphasis on procedures and standardized their format. Here's an example mostly inspired by Lisp:
import(corelib)
import(iostream)
use namespace std;
fun main(ptr<int>(argc) ptr<ptr<int>>(argv)): void
{
cout.print("Enter The Size Of Array: ", endl);
def(size): int
cin.read(size)
def(key, i): int
def(arr): array<int>(size)
// Taking Input In Array
for( =(i, 0) <(i, size) ++(i) )
{
cout.print( "Enter ", i, " Element: ", endl )
cin.read( arr[i] )
}
//Your Entered Array Is
for( =(i, 0) <(i, size) ++(i) )
{
cout.print( "array[", i, "] = " )
cout.print( arr[i], endl )
}
cout.print( "Enter Key To Search in Array", endl )
cin.read( key )
for( =(i, 0) <(i, size) ++(i) )
{
if( ==(key, arr[i]) )
{
cout.print( "Key Found At Index Number : ", i, endl )
break
}
}
if( ==(i, size) ) cout.print( "KEY NOT FOUND", endl )
}