Your language here
Miscellaneous Forums/General Discussion/Your language here
If you could write your own programming language what would you base it on?
Mine would be a mix of Blitz and Pyton with a hint of C++
The language would feature the following charactistics:
+ Minimalistic coding
========================================
Example #1
I would drop "End Type" / "End Function" for a simple "end" statement to terminate code blocks
Example #2
Shorthand coding:
ship+24 vs ship=ship+24
myvar/2 vs myvar=myvar/2
+ No need to put semicolons at the end of every line
=====================================
I hate having to do this in Java
+ lowercase throughout
======================================
All system commands in lowercase except for custom types / methods / functions
Now, for a real-world example
type alien
TImage img
string name
float posX, posY
end
a=new alien
a.img=TImage.Load("myalien.png")
a.name="slug",20,50 ' fill in all remaing params for alien
repeat
cls
for i=0 to 200
x+1 ; y/2
if x=5 movealien ; x=0
end
drawimage a.img,a.posX,a.posY
flip
until keyhit(KEY_ESCAPE)
func movealien()
a.posX+2 ; a.posY+1.5
end
I love Lua, but it's procedural and dynamically typed, which is great for scripting, and horrible in a full-blown programming language. So I guess my "own language" would be some kind of ghastly hybrid of BlitzMax, C# and Java. Essentially leveraging the features of the latter two into a syntax more similar to the former.
What you have there looks extremely close to BlitzMax. Capitalisation on system commands is a non issue as Max isn't case sensetive.
Myvar+2 is close to Max's Myvar:+2 (I prefer the latter)
I like end type etc... it's clearer when there's a lot of nesting.
If I came up with a language it would be a lot like Max, but with proper structs and some way of getting around the garbage collector.
I would drop "End Type" / "End Function" for a simple "end" statement to terminate code blocks
I think that that would get confusing with nested code blocks.
ship+24 vs ship=ship+24
myvar/2 vs myvar=myvar/2
You can already do this in BlitzMax using...
ship:+2
myvar:/2
No need to put semicolons at the end of every line
Completely agree!
lowercase throughout
Yeah, it would be kinda nice to be able to instantly distinguish from internal and your own functions just at a glance (I suppose syntax highlighting should do that anyway) but I suppose the language would really have to be case-sensitive to benefit from this particular suggestion (which wouldn't be very friendly to new programmers just starting out).
Edit: Basically what John Galt said 27 seconds before me. ;-)
I'd write a OOP heavy language based on C++, but with the syntax of BASIC/python mixed
I'll be the odd one out and say the syntax of C/C++/C# etc but with the semicolon being optional.
Python without having to add 'self' manually and maybe even without the ":". And since I'm also an odd one, I'd love to have it as a hybrid language, meaning that it could be compiled to native code, but without giving up any of its highly dynamic features. Kind of what the Boo guys are trying to do.
COBOL. :)
My language has only 1 command with 1 argument:
Create "<description of software>"
Jokes aside:
English, no symbols/decoration, and mostly like BMax, with a few C++ additions I guess. Oh, and little point in omitting the name from an 'End <..>' construction. Biggest part of programming is looking and thinking, not typing. Rather 1% more typework over the whole project and readable code than saving 1% typework while ending up with a less clear source.
A mixture of Esperanto and Latin.
A mixture of Esperanto and Latin
This is no time to be talking about fancy coffees.
One of the reasons I've always favored basic-style syntax' is that its wordy, but not too wordy. EndIf,Next,Wend, are just right for me. having just 'End' or a bunch of "}'s" isn't my thing
BasicAsm.
BlitzMax + ( C# - ugly_syntax & must_oop )
if (!(language==C++) break;
This is:
Minimalistic coding
Shorthand coding
No need to put semicolons at the end of every line
Its my breath
lowercase throughout
No one is perfect... :)
I'm developing a script system which is somewhat modelled on how you program in assembler, but made basic-like friendly. Requires minimal interpretation overhead.
Deoxyribonucleic acid (DNA) program language: only 4 'main' object-type and some billions combinations of results....
A programming language (for me) must NOT have { } ; << *word ^ and all those strange symbols you find on the keyboard and you dont' know why they exist until you discover one of those strange languages (like '~' (tilde) - on my italian standard keyboard it doesnt' exist - I need to switch with English keyboard via the COntrolPanel->Language tool)
And what's better than WHILE...WEND FOR..NEXT IF..ENDIF - everything is more readable - without the needs of an IDE with folding function support.
A no case sensitive...
blitzmax with support for more platforms
xbox,mobile phones - we can but dream!
Getting rid of "End Function" in preference of "Function ... End"...
Why not just go the C route and replace: -
Function someFunc()
Some stuff.
End Function
With...
someFunc()
{
Some stuff
}
Seems perfectly reasonable to me. I understand the argument of "nesting makes it unreadable", but I believe it is moot. If it confuses you, put a comment at the "}" ...
someFunc()
{
Some stuff
} // end someFunc()
Why would you want accolades? To save typing time? To save that .01% project time (which might *cost* 1% project time as things may become less clear to read!)? Especially functions, how often do you make a function? IDE with code completion should handle most of the dull typing work anyway..
C++
I would have a language where the syntax could be decided by the programmer, so you could import code from ANY language and have it compile perfectly.
It already exists, mostly. Lisp. It is so far above and beyond languages like C++, Python, Ruby, etc.
I'd just clean it up and make the function names more sensical. All non-consing versions would start as n-'function-name' , etc.
I'd also see to it that it got an extremely advanced JIT compiler, as that's the one thing C# and Java has on it.
I would want a cross platform language with the simplicity of Bmax which was as modular, did not rely 100% on 1 engine (like b3d). I would have optional oop, easy interface with other languages, optional strict, good debugger.
I also prefer {}s for code blocks instead of "end this" and "end that" but thats just being fussy. Oh and solid standards, what works on one works on all... no bastardisation (ie MS+java).
What name would you call your new programming language?
Mine would be suitably called "bug"
Practically Python.
A mix of BlitzMax and C#.
Basically BMax with operator overloading, private/public fields/methods etc.. (ie. all the fancy stuff) :p
BasicAsm.
I have one of these when I use Blitz.
Basically BMax with operator overloading, private/public fields/methods etc.. (ie. all the fancy stuff) :p
What LarsG said :D
and threads
Actually, if you combined C++ with BlitzMax so that you could write in either syntax, that would be pretty close to the dog's bollocks. :) Oh, and maybe Python too. ;)
You said a naughty word.
Anyway, I'd have a MakeGame() function. That'll do for me.
Oh, and I'd call it something like... oh I dunno.... 3D Dame Maker, or something.
What name would you call your new programming language?
BlitzMax Sharp. Intentionally not with a # to reflect the wordier syntax and reduced reliance on symbols for everything.
> You said a naughty word.
It's not naughty, it's a genuine word in the English language used to describe a part of the anatomy.
I can't really tell you what I would like in a programming language, but one of the reasons I like using Blitz so much is that all the keywords make sense. FreeEntity, CreateBank, ImagesCollide, CopyRect, etc. The thing I don't like about PHP is all the functions have special names and sometimes unusual parameter ordering, so I have to go look up the functions before I can use them - big waste of time when I just wanna use it.
Another big reason I use Blitz is it doesn't take a lot of code to get things up and running. When you create a 3D program, you don't even need any setup commands before you can display a scene or an object. In my dealings with OpenGL and what I know of DirectX, there's 100's of lines of code to just set up the environment. Sure, not everyone wants to have the same setup to their scene, but most will. If you want to create an environment with unique properties, let the user specify that, but otherwise go by some default values.
The biggest thing that pulls me away from using C# is its sheer size of commands. I don't even know what half of them are used for, even in only the string class. Sure, there's a lot you can do, but I have to spend lots of time trying to find the one function that does what I need, and then I have to use a dozen others to manipulate the objects to use the function properly. For this reason I think XNA is heading in the wrong direction. There are so many objects you have to manipulate just to call one function that, even though you're running only one line, your lines can be several pages wide. I want a language with simple data structures, not a robust object system that does everything.
A language should be easy to pick up and go far with, without using a huge amount of command names. Blitz is very good at that, but it only goes so far into controlling the operations.
Just my two cents, hope that helps ya.
I would like an english language compiler, so I could program like this:
Make a window which is 1024 by 768 pixels.
Draw a cube.
Rotate it for 10 seconds around all axes.
Make it double size.
Make it half transparent.
Wait 10 seconds.
Draw a big cube which is under my feet.
Draw 100 cubes and make them use gravity.
mm.. actually I think soon you'll get pretty sick of functions with tons of arguments.. :P
I would like an english language compiler, so I could program like this:
Make a window which is 1024 by 768 pixels.
Draw a cube.
Rotate it for 10 seconds around all axes.
Make it double size.
Make it half transparent.
Wait 10 seconds.
Draw a big cube which is under my feet.
Draw 100 cubes and make them use gravity.
See DarkBasic !!
I would like an english language compiler
It looks like the
latest version of Inform, the interactive fiction interpreter... which confused the hell out of me! it looks interesting on paper, until you have to debug what you wrote and your language isn't intelligent and flexible enough to actually understand your english. In the end it becames a visually non-structured language with verbose and strict sintax. I admit that I didn't spend much time on it however, and reading
source code written with it is fascinating.
Actually, if you combined C++ with BlitzMax so that you could write in either syntax, that would be pretty close to the dog's bollocks. :) Oh, and maybe Python too. ;)
Since you can freely import C++ code in BlitzMax, that's not very different from current reality. Still, I'd like it too.