[Issue 5803] Inaccuracies in the specification of the grammar

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 5803] Inaccuracies in the specification of the grammar

2020-01-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

Dennis  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=20504

--


[Issue 5803] Inaccuracies in the specification of the grammar

2020-01-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

Dennis  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=20503

--


[Issue 5803] Inaccuracies in the specification of the grammar

2019-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

--- Comment #6 from Rainer Schuetze  ---
I haven't looked through the full diff, but the very first two lines are still
valid: both the module declaration and the other declarations are optional
which isn't covered by the grammar found in the language spec.

--


[Issue 5803] Inaccuracies in the specification of the grammar

2019-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

berni44  changed:

   What|Removed |Added

 CC||bugzi...@d-ecke.de

--- Comment #5 from berni44  ---
Is this still valid?

--


[Issue 5803] Inaccuracies in the specification of the grammar

2016-10-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5803

Andrei Alexandrescu  changed:

   What|Removed |Added

   Keywords||bootcamp
 CC||and...@erdani.com

--


[Issue 5803] Inaccuracies in the specification of the grammar

2011-03-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5803



--- Comment #4 from Don  2011-03-31 13:11:27 PDT ---
(In reply to comment #3)
> (In reply to comment #1)
> > One fairly big mistake in there: there seems to be confusion between
> > StructLiteral and StructStaticInitializer. 
> 
> Maybe I oversimplified here, but I was hoping for a generalization of the
> array/struct initializer and literals. 
> 
> IIRC the StructStaticInitializer is said to be deprecated anyway, but it might
> actually be possible to interpret it as a literal inside expressions with
> implicite conversions, similar how dmd deals with arrays, because the parser
> cannot decide which type of array a variable is declared as until the semantic
> pass.

They have very different semantics. Given only a StructLiteral, you can always
work out what type it is. But with a static initializer, you know nothing. This
might be the only thing in the language like that. It's not implicit
conversion, they don't have an initial type to convert from.

So  auto x = StructLiteral();  works, but auto x = structStaticInitializer
cannot. Consequently, you can use a struct literal almost anywhere you can use
a struct variable.

I've tried to get them deprecated but I don't know if that will happen. They
are one of the most complicated things in the language, and the implementation
is *full* of bugs.

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


[Issue 5803] Inaccuracies in the specification of the grammar

2011-03-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5803



--- Comment #3 from Rainer Schuetze  2011-03-31 12:01:27 
PDT ---
(In reply to comment #1)
> One fairly big mistake in there: there seems to be confusion between
> StructLiteral and StructStaticInitializer. 

Maybe I oversimplified here, but I was hoping for a generalization of the
array/struct initializer and literals. 

IIRC the StructStaticInitializer is said to be deprecated anyway, but it might
actually be possible to interpret it as a literal inside expressions with
implicite conversions, similar how dmd deals with arrays, because the parser
cannot decide which type of array a variable is declared as until the semantic
pass.

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


[Issue 5803] Inaccuracies in the specification of the grammar

2011-03-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5803


Trass3r  changed:

   What|Removed |Added

 CC||mrmoc...@gmx.de


--- Comment #2 from Trass3r  2011-03-31 04:22:11 PDT ---
I'm already working on folding some of the changes I agree with into my github
fork @ https://github.com/Trass3r/d-programming-language.org

Will push soon.

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


[Issue 5803] Inaccuracies in the specification of the grammar

2011-03-31 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5803


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don  2011-03-31 03:05:48 PDT ---
One fairly big mistake in there: there seems to be confusion between
StructLiteral and StructStaticInitializer. 

Foo z = { x: 7, y: 56};
is a struct static initializer, not a struct literal.
Foo(7, 56); is a struct literal.

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