some fellow programmer's suggestions plz :)
-
- Member
- Posts: 25
- Joined: Fri Jun 05, 2009 11:46 pm
some fellow programmer's suggestions plz :)
Hey osdev.org peoplez, i decided that im going to be writing my 4th programming language, and this one will be a compiler (my second compiler, the other two i wrote were interpreted languages). Just like the others, their syntax will be of my own design, and yours too! i want you guys to give me some ideas on features that you think would be cool in a language. So far, i have the following stuffs from suggestions from some friends:
functions:
function funcname(args)
code
endfunction
structures (just like in c++ guys )
structure mystruct
some variables
some functions
blah blah blah
endstructure
loops:
loop (break to break the loop)
code
endloop
conditions:
if condition do
code
endif
variables:
byte myvariable = blah
pointers:
byte pointer = ->myvariable (make pointer point to myvariable)
pointer-> = blah (set value that pointer points to)
pointer = ->funcname(args)
pointer->(args) (execute function pointer points to)
strings:
byte[12] hello = "hello world" + 0x00
other stuff:
jump blah (jump to a location in the memory)
push(value)
pop(destinationvariable)
syssetreg(reg, value) (set the value of a register)
sysint(interrupt) (call an interrupt)
plz tell me what you think and how the syntax can be improved/changed. i am trying to make a language capable of very low level things and still keep the ability to achieve high level syntax. any and all suggestions are welcome .
regards
teddy
functions:
function funcname(args)
code
endfunction
structures (just like in c++ guys )
structure mystruct
some variables
some functions
blah blah blah
endstructure
loops:
loop (break to break the loop)
code
endloop
conditions:
if condition do
code
endif
variables:
byte myvariable = blah
pointers:
byte pointer = ->myvariable (make pointer point to myvariable)
pointer-> = blah (set value that pointer points to)
pointer = ->funcname(args)
pointer->(args) (execute function pointer points to)
strings:
byte[12] hello = "hello world" + 0x00
other stuff:
jump blah (jump to a location in the memory)
push(value)
pop(destinationvariable)
syssetreg(reg, value) (set the value of a register)
sysint(interrupt) (call an interrupt)
plz tell me what you think and how the syntax can be improved/changed. i am trying to make a language capable of very low level things and still keep the ability to achieve high level syntax. any and all suggestions are welcome .
regards
teddy
"I don't take advice from freshmen in high school" - when your programming, age doesn't matter
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
-
- Member
- Posts: 199
- Joined: Sat Jun 28, 2008 6:44 pm
Re: some fellow programmer's suggestions plz :)
Implement lambda abstraction.
???
Profit.
???
Profit.
-
- Member
- Posts: 25
- Joined: Fri Jun 05, 2009 11:46 pm
Re: some fellow programmer's suggestions plz :)
oo yes, that is a great idea . I will do that .
"I don't take advice from freshmen in high school" - when your programming, age doesn't matter
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
-
- Member
- Posts: 25
- Joined: Fri Jun 05, 2009 11:46 pm
Re: some fellow programmer's suggestions plz :)
oo, thanks, reading through those threads right now .
"I don't take advice from freshmen in high school" - when your programming, age doesn't matter
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
Re: some fellow programmer's suggestions plz :)
it's bad looking. About like BASIC for system programming.
I doubt it'll get very far and in a few weeks you'll be thinking what a cumbersome language this is, and be using C instead
I doubt it'll get very far and in a few weeks you'll be thinking what a cumbersome language this is, and be using C instead
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: some fellow programmer's suggestions plz :)
Says the one who hasn't seriously programmed it and is speaking out of prejudice.in a few weeks you'll be thinking what a cumbersome language this is
No language bashing please.
- steveklabnik
- Member
- Posts: 72
- Joined: Wed Jan 28, 2009 4:30 pm
Re: some fellow programmer's suggestions plz :)
However, this language offers NOTHING over something like C. It's just C with 'endwhatever' instead of '{' and '->' instead of '*'.Combuster wrote:Says the one who hasn't seriously programmed it and is speaking out of prejudice.in a few weeks you'll be thinking what a cumbersome language this is
No language bashing please.
It's not even worth the time it would take to implement.
I agree with you, language bashing for the sake of language bashing is silly, however, this 'language' will just be a waste of time. Not that there's anything wrong with wastes of time, mind you. But the OP should be aware that that's what this is. If he wants to waste his time, more power to him.
-
- Member
- Posts: 25
- Joined: Fri Jun 05, 2009 11:46 pm
Re: some fellow programmer's suggestions plz :)
well, that's why im here, for you guys to tell me how i may improve it. I don't mind if he bashes it and says it sux, that just means i have to go back to the drawing board . and that's no problem with me . back to the drawing board it is.
"I don't take advice from freshmen in high school" - when your programming, age doesn't matter
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
- steveklabnik
- Member
- Posts: 72
- Joined: Wed Jan 28, 2009 4:30 pm
Re: some fellow programmer's suggestions plz :)
I love compilers. Its one of the things that I find really interesting about Computer Science in general. So please don't take my words as being discouraging.flyingdoodltartz wrote:well, that's why im here, for you guys to tell me how i may improve it. I don't mind if he bashes it and says it sux, that just means i have to go back to the drawing board . and that's no problem with me . back to the drawing board it is.
There's nothing wrong with doing something to learn about it. Yes, there are a ton of C compilers out there, but if you've never written one before, writing yet another C compiler is probably the best way to learn about the subject. So if this is your reason for doing so...write another C compiler!
However, if you want to write a new language that'll help people do systems programming more easy, then you need to come up with language features that are helpful to people writing systems. It's not as simple as changing some syntax... find something that's hard to do, and try to make it easier.
That's a pretty tall order, though. Good luck!
-
- Member
- Posts: 25
- Joined: Fri Jun 05, 2009 11:46 pm
Re: some fellow programmer's suggestions plz :)
lol thanks. This is actually the second compiler i've written. The other one was the learning one (super super useless language). So i guess i will take your advice and wait until i run into a bunch of problems that could be made easier. The actual goal of my language was to create a language capable of achieving low level implementations, but still maintain the ability to do high level stuffs. I think ill go look at more languages as a model and think of more stuff that can be done.
thanks for your feedback
teddy
thanks for your feedback
teddy
"I don't take advice from freshmen in high school" - when your programming, age doesn't matter
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher
"if you think your running fast, run faster." - track coach
"Back in my day, I had a pimped out ride." - physics teacher