BLADE 0.2Alpha: Vector operations with mixins, expression templates,
Pragma
ericanderton at yahoo.removeme.com
Mon Apr 9 10:25:54 PDT 2007
Dan wrote:
> Pragma Wrote:
>> In short: no. But it's really an unintentionally loaded question: there are some rather severe limitations as to what
>> kind of data structures you can create at compile time. You're basically limited to tuples and strings, each of which
>> have drawbacks of their own.
>>
>> You can create a tree using tuples, but then you run into problems with over-running the limitations on identifier
>> length built into the compiler. Strings are no where near as flexible out of the box, but pose no storage limitations,
>> which gives a slight edge to string-based representations of data. With some clever coding, strings can be made to
>> store just about any structure imaginable (even if it does make for some ugly code).
>
> Well said. Once the AST is reflected at compile time, I'm sure the code can be made vastly more refined; and perhaps additional code generators can be developed and *hopefully* integrated into D.
Thanks. But evaluating the AST will only take things so far. There is a huge gulf of functionality that stands between
where we are now (at compile time) and what D would be like as a full-on scripting language (not that I'm advocating
that it be pushed that far). Much of what sits in the middle (namely structs, multi-dimensional arrays and maps) can go
a long way towards *analyzing* that tree for code generation and more.
>
> Particular generators that spark my interest tend to have to do with x87, SSE extensions, and x86-64. Most compilers to date don't properly use these functionalities. Having them integrated into D Agner Fog-optimally would hugely replace alot of C++ gaming, video, rendering and graphics engine code.
>
Anyway, I'm grinning too. I can't wait to see what comes up next. So far, converting Enki to a compile-time generator
is proving to be a huge challenge, but workable.
--
- EricAnderton at yahoo
More information about the Digitalmars-d
mailing list