Why D is annoying =P
Mehrdad
wfunction at hotmail.com
Wed Oct 24 22:07:36 PDT 2012
On Thursday, 25 October 2012 at 04:39:28 UTC, H. S. Teoh wrote:
> On Thu, Oct 25, 2012 at 06:21:02AM +0200, Mehrdad wrote:
>> Haha thanks a bunch for the advice. :) I was actually
>> intending it
>> to be a quick hack, not a highly-generalized thing.
>>
>> So I thought, hey, I'll just use a
>> Tuple!(string, q{symbol}, size_t, q{iRule}, size_t, q{iSymbol})
>> to denote an "LR Item".
> [...]
>
> Hmm, why are you using Tuple? Shouldn't you be using a struct?
>
>
> T
Hmm, why would I prefer a struct over a Tuple?
I see it as, like, coordinates -- the index of the symbol in the
production, and the index of the production for a given
nonterminal symbol.
So tuple(x, y, z) kinda made sense. Especially since I was going
back/forth between D & Python.
More information about the Digitalmars-d
mailing list