What would you want in a programming language?
Posted: Fri Mar 07, 2008 8:16 pm
Well?
The Place to Start for Operating System Developers
https://f.osdev.org/
Code: Select all
char* data = stack char[30];
It is possible to do this in C99 with variable-length arrays.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];
Doh.Colonel Kernel wrote:variable-length arrays.
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.SandeepMathew wrote:C# will someday attain everything you mentioned
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!Colonel Kernel wrote:It is possible to do this in C99 with variable-length arrays.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];
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.
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.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!
Agreed. IMO, language 'evolution' is a poor idea that eventually results is mud.Colonel Kernel wrote: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.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!
I always thought that would be awesome. I may try doing that after I am satisfied with my OS(Never Gonna Happen )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.
Such a desired language already exists, it is called C--nekros wrote:I always thought that would be awesome. I may try doing that after I am satisfied with my OS(Never Gonna Happen )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.