digitalmars.D - Pointer arithmetic
- Michal (3/3) Oct 15 2007 Hi,
- Frits van Bommel (6/8) Oct 15 2007 Pointer arithmetic works, but (obviously) only when you're actually
- Kyle Furlong (3/13) Oct 15 2007 That being said, D can be used as a better C. (no preprocessor, modules,...
- Alexander Panek (3/5) Oct 15 2007 Definitely!
- Kyle Furlong (6/12) Oct 15 2007 I guess to elaborate on this, since people might find it interesting,
- Jarrett Billingsley (8/20) Oct 15 2007 Some friends and I are doing just that right now. We're using GDC and i...
Hi, Im new to D language, and Im wondering if there is pointer arithmetic. I think its very useful thing, sometimes more convenient than []. Thx for reply.
Oct 15 2007
Michal wrote:Hi, Im new to D language, and Im wondering if there is pointer arithmetic. I think its very useful thing, sometimes more convenient than [].Pointer arithmetic works, but (obviously) only when you're actually using pointers. However between class references, real array types and ref (aka inout)/out parameters, raw pointer usage in D programs is typically very low (and is normally discouraged unless there's no other way).
Oct 15 2007
Frits van Bommel wrote:Michal wrote:That being said, D can be used as a better C. (no preprocessor, modules, etc.)Hi, Im new to D language, and Im wondering if there is pointer arithmetic. I think its very useful thing, sometimes more convenient than [].Pointer arithmetic works, but (obviously) only when you're actually using pointers. However between class references, real array types and ref (aka inout)/out parameters, raw pointer usage in D programs is typically very low (and is normally discouraged unless there's no other way).
Oct 15 2007
Kyle Furlong wrote:That being said, D can be used as a better C. (no preprocessor, modules, etc.)Definitely! /me puts some emphasis marks around that post
Oct 15 2007
Alexander Panek wrote:Kyle Furlong wrote:I guess to elaborate on this, since people might find it interesting, for x86 at least, D is a wonderful choice for OS design. I've worked with D in a couple of kernel programming cases, and while you dont have all the bells and whistles of the runtime with the GC and all of that, what you do get is a more sane, manageable C-like language.That being said, D can be used as a better C. (no preprocessor, modules, etc.)Definitely! /me puts some emphasis marks around that post
Oct 15 2007
"Kyle Furlong" <kylefurlong gmail.com> wrote in message news:ff0qrg$16fk$1 digitalmars.com...Alexander Panek wrote:Some friends and I are doing just that right now. We're using GDC and its extended ASM syntax to write an x86-64 exokernel OS. It's certainly a lot nicer to deal with than vanilla C, and with some of the basic runtime elements defined / stubbed out, you don't miss some of the more dynamic features that much. (We haven't gotten dynamic memory or even virtual memory implemented yet ;) )Kyle Furlong wrote:I guess to elaborate on this, since people might find it interesting, for x86 at least, D is a wonderful choice for OS design. I've worked with D in a couple of kernel programming cases, and while you dont have all the bells and whistles of the runtime with the GC and all of that, what you do get is a more sane, manageable C-like language.That being said, D can be used as a better C. (no preprocessor, modules, etc.)Definitely! /me puts some emphasis marks around that post
Oct 15 2007