[Issue 10803] pragma(msg, ...) fails with enum TypeTuple: compilation error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 12 11:27:47 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10803



--- Comment #7 from Dicebot <public at dicebot.lv> 2013-08-12 11:27:46 PDT ---
(In reply to comment #6)
> It's documented in "Tuple Declarations" part.

"Tuple Declarations" part speaks about something quite different - that you can
use type tuple to group/ungroup parameter lists and reference that parameters
using positional syntax, not via names.

Now, after you comment, I see how actual tuple semantics/implementation makes
both cases related. But documentation does not speak about what `TL` and `tl`
actually are in that example or what happens from the type system point of
view. It is just a single use case and it looks as special syntax sugar with no
extra meaning. I am asking for a more detailed explanation in that part.

> The confusion comes from the naming. I prefer to use different name "sequence"
> for the built-in tuple, but it is not consensus...

No, that is something I got used to. I am speaking about something different:

enum a = TypeTuple!(int, string); // does not compile
enum a = TypeTyple!("aaa", "bbb"); // works, typeof(a) == TypeTuple!(string,
string), has no defined ABI
enum a = tuple("aaa", "bbb"); // works, typeof(a) == Tuple!(string, string), is
technically a struct 

3 cases very similar syntax-wise and so different in practice.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list