What would you want in a programming language?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

What would you want in a programming language?

Post by nekros »

Well?
User avatar
Zacariaz
Member
Member
Posts: 1069
Joined: Tue May 22, 2007 2:36 pm
Contact:

Post by Zacariaz »

That is the age old question that you will never really get an answer to. People are used to various sort of programming languages and naturally when commenting on what they would like, it is colored by what they allready know.
Anyway i know i can't give an honnest answer.
This was supposed to be a cool signature...
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Post by nekros »

Particularly OSDEV.
Hangin10
Member
Member
Posts: 162
Joined: Wed Feb 27, 2008 12:40 am

Post by Hangin10 »

Very few semantics about what type IS what. char is really 1 byte. Character should be a class along with String (and the appropriate operators built-in [not overloaded]). default everything unsigned.

And what I wondered lately is why there's never any dynamic allocation on the stack. Like instead of new, just say:

Code: Select all

char* data = stack char[30];
and you just wouldn't be able to delete (as you can't really keep track using just add/sub ESP). Such a thing would really help with doing memory allocation before having an allocator. You'd be able to read in and store the BIOS memory map provided by the bootloader, and then calculate how many bytes are needed for the allocator's bitmap (just put it immediately after the kernel, followed by the descriptor tables, etc) without needing so much more logic in the add-bytes-to-pointer-of-mem-used-past-kernel allocator (at least thats how I've been doing it).

There's probably a lot more, but everyone is going have some odd thing that they'd like to do, like bit indexing (an operator for BSR/BTC/etc instructions) or something. A language can only be so low level before it
stops being portable, unless you don't care about that...
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

Hangin10 wrote:And what I wondered lately is why there's never any dynamic allocation on the stack. Like instead of new, just say:

Code: Select all

char* data = stack char[30];
It is possible to do this in C99 with variable-length arrays.

For me, I would like a systems programming language that offers more abstractions like closures and iterators (optional of course), more type safety (also optional of course), and a clear delineation between the type-safe world and pointer la-la land. Type inference would also be nice.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
Hangin10
Member
Member
Posts: 162
Joined: Wed Feb 27, 2008 12:40 am

Post by Hangin10 »

Colonel Kernel wrote:variable-length arrays.
Doh. :oops:
DeletedAccount
Member
Member
Posts: 566
Joined: Tue Jun 20, 2006 9:17 am

Post by DeletedAccount »

C# will someday attain everything you mentioned , Please do not start a holy war now, it's just my opinion . I may be wrong. ( You can assume I am wrong!) . The D programming Language from Digital Mars seems to be impressive .
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

SandeepMathew wrote:C# will someday attain everything you mentioned
It's not bad, but IMO it's too trapped in the Java-esque way of looking at types. That may be ok for small-scale kernel dev, but for the more complex bits I prefer something a bit more dynamic and flexible.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Colonel Kernel wrote:
Hangin10 wrote:And what I wondered lately is why there's never any dynamic allocation on the stack. Like instead of new, just say:

Code: Select all

char* data = stack char[30];
It is possible to do this in C99 with variable-length arrays.

For me, I would like a systems programming language that offers more abstractions like closures and iterators (optional of course), more type safety (also optional of course), and a clear delineation between the type-safe world and pointer la-la land. Type inference would also be nice.
Prepare yourself for the UberBeast that is C++0x! I read the wiki page the other day - it will contain closures and iterators builtin, along with a foreach loop. Granted, it uses an absolutely heinous syntax, but it's better than nothing!
User avatar
Colonel Kernel
Member
Member
Posts: 1437
Joined: Tue Oct 17, 2006 6:06 pm
Location: Vancouver, BC, Canada
Contact:

Post by Colonel Kernel »

JamesM wrote:Prepare yourself for the UberBeast that is C++0x! I read the wiki page the other day - it will contain closures and iterators builtin, along with a foreach loop. Granted, it uses an absolutely heinous syntax, but it's better than nothing!
Yeah, I know about the feature free-for-all that is C++0x. C++ is already too difficult for most people to figure out -- I don't see how C++0x is going to make it any better. Plus, the type system is still unsafe.
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Colonel Kernel wrote:
JamesM wrote:Prepare yourself for the UberBeast that is C++0x! I read the wiki page the other day - it will contain closures and iterators builtin, along with a foreach loop. Granted, it uses an absolutely heinous syntax, but it's better than nothing!
Yeah, I know about the feature free-for-all that is C++0x. C++ is already too difficult for most people to figure out -- I don't see how C++0x is going to make it any better. Plus, the type system is still unsafe.
Agreed. IMO, language 'evolution' is a poor idea that eventually results is mud.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

I would want something similar to HLA (High Level Assembly), but not quite as high-level lol. I like the syntax for alot of Intel Assembly language, but I also love the C style IF & FOR macros. I would 100% want direct register manipulation, but with some C-style macros built in.


so basically, I want Assembly, but with a little C-style mixed in.
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post by SpooK »

More cowbell...
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Post by nekros »

01000101 wrote:I would want something similar to HLA (High Level Assembly), but not quite as high-level lol. I like the syntax for alot of Intel Assembly language, but I also love the C style IF & FOR macros. I would 100% want direct register manipulation, but with some C-style macros built in.


so basically, I want Assembly, but with a little C-style mixed in.
I always thought that would be awesome. :D I may try doing that after I am satisfied with my OS(Never Gonna Happen :D )
SpooK
Member
Member
Posts: 260
Joined: Sun Jun 18, 2006 7:21 pm

Post by SpooK »

nekros wrote:
01000101 wrote:I would want something similar to HLA (High Level Assembly), but not quite as high-level lol. I like the syntax for alot of Intel Assembly language, but I also love the C style IF & FOR macros. I would 100% want direct register manipulation, but with some C-style macros built in.


so basically, I want Assembly, but with a little C-style mixed in.
I always thought that would be awesome. :D I may try doing that after I am satisfied with my OS(Never Gonna Happen :D )
Such a desired language already exists, it is called C-- :idea:
Post Reply