Jump to page: 1 25  
Page
Thread overview
Stroustrup's slides about c++11 and c++14
Sep 13, 2014
eles
Sep 13, 2014
ketmar
Sep 13, 2014
Paulo Pinto
Sep 13, 2014
Joakim
Sep 13, 2014
po
Sep 14, 2014
Joakim
Sep 14, 2014
deadalnix
Sep 13, 2014
Walter Bright
Sep 13, 2014
Paulo Pinto
Sep 13, 2014
Peter Alexander
Sep 13, 2014
Timon Gehr
Sep 14, 2014
bearophile
Sep 14, 2014
Walter Bright
Sep 14, 2014
Paolo Invernizzi
Sep 14, 2014
deadalnix
Sep 15, 2014
bearophile
Sep 30, 2014
SomeDude
Sep 30, 2014
deadalnix
Sep 30, 2014
bearophile
Sep 30, 2014
Walter Bright
Sep 30, 2014
eles
Sep 14, 2014
Timon Gehr
Sep 14, 2014
Daniel Murphy
Sep 14, 2014
Walter Bright
Sep 14, 2014
eles
Sep 14, 2014
deadalnix
Sep 14, 2014
Walter Bright
Sep 15, 2014
Timon Gehr
Sep 15, 2014
Timon Gehr
Sep 17, 2014
Dicebot
Sep 14, 2014
David Nadlinger
Sep 14, 2014
David Nadlinger
Sep 17, 2014
Dicebot
Sep 14, 2014
deadalnix
Sep 14, 2014
Peter Alexander
Sep 14, 2014
Elie Morisse
Sep 15, 2014
Sean Cavanaugh
September 13, 2014
This presentation:

https://parasol.tamu.edu/people/bs/622-GP/C++14TAMU.pdf

He criticizes C99 VLA (slide 24) as being "an abomination"

But the surprise comes at the end (slide 57), where he also criticizes... the static if as being "a total abomination". Well, this is D, I told myself.

Are those points valid?:

static if is a total abomination
• Unstructured, can do everything (just like goto)
• Complicates static analysis (AST-based tools get hard to write)
• Blocks the path for concepts
• Specifies how things are done (implementation)
• Is three slightly different “ifs” using a common syntax
• Redefines the meaning of common notation (such as { ... })

September 13, 2014
On Sat, 13 Sep 2014 20:10:53 +0000
eles via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

even if he crated one of the worst known abominations on the planet this still doesn't mean that he is any kind of expert in abomination analysis.


September 13, 2014
Am 13.09.2014 22:10, schrieb eles:
> This presentation:
>
> https://parasol.tamu.edu/people/bs/622-GP/C++14TAMU.pdf
>
> He criticizes C99 VLA (slide 24) as being "an abomination"


I agree with him.

C99 VLA are the typical open door to security exploits via the stack frame, that C brought upon the IT world.

To the point C11, which took security as one of the goals, has made VLA optional.

>
> But the surprise comes at the end (slide 57), where he also
> criticizes... the static if as being "a total abomination". Well, this
> is D, I told myself.

Well, Bjarne has his own proposal, concepts, so there is a bit of salesman speech here, I would say.

--
Paulo
September 13, 2014
On Saturday, 13 September 2014 at 20:10:55 UTC, eles wrote:
> This presentation:
>
> https://parasol.tamu.edu/people/bs/622-GP/C++14TAMU.pdf
>
> He criticizes C99 VLA (slide 24) as being "an abomination"
>
> But the surprise comes at the end (slide 57), where he also criticizes... the static if as being "a total abomination". Well, this is D, I told myself.
>
> Are those points valid?:
>
> static if is a total abomination
> • Unstructured, can do everything (just like goto)
> • Complicates static analysis (AST-based tools get hard to write)
> • Blocks the path for concepts
> • Specifies how things are done (implementation)
> • Is three slightly different “ifs” using a common syntax
> • Redefines the meaning of common notation (such as { ... })

Heh, I like how he says static if was proposed by "Walter Brown." ;)

Is it just me or did it seem like most of the stuff in those slides is already in D?  I don't follow C++.
September 13, 2014
> Heh, I like how he says static if was proposed by "Walter Brown." ;)
>
> Is it just me or did it seem like most of the stuff in those slides is already in D?  I don't follow C++.

 Walter Brown is a real person;)

 The C++ dynarray stuff was appealing to me, but it got delayed, and who knows if it will appear again:(

September 13, 2014
On 9/13/2014 1:10 PM, eles wrote:
> This presentation:
>
> https://parasol.tamu.edu/people/bs/622-GP/C++14TAMU.pdf
>
> He criticizes C99 VLA (slide 24) as being "an abomination"
>
> But the surprise comes at the end (slide 57), where he also criticizes... the
> static if as being "a total abomination". Well, this is D, I told myself.
>
> Are those points valid?:
>
> static if is a total abomination
> • Unstructured, can do everything (just like goto)
> • Complicates static analysis (AST-based tools get hard to write)
> • Blocks the path for concepts
> • Specifies how things are done (implementation)
> • Is three slightly different “ifs” using a common syntax
> • Redefines the meaning of common notation (such as { ... })
>

Yeah, well, we have many years of experience with "static if" and no apocalypse has yet happened.

The proposal:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3329.pdf

Bjarne's rebuttal:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3613.pdf


C++ is adopting D features anyway. The constexpr proposals are looking a lot like CTFE :-)
September 13, 2014
Am 14.09.2014 00:25, schrieb Walter Bright:
> On 9/13/2014 1:10 PM, eles wrote:
>> [...]
>
>
> C++ is adopting D features anyway. The constexpr proposals are looking a
> lot like CTFE :-)

In that sense, regardless of D's future, I would say it is already a big win to have that influence over C++'s design decisions.

__
Paulo
September 13, 2014
On Saturday, 13 September 2014 at 22:25:57 UTC, Walter Bright wrote:
> Yeah, well, we have many years of experience with "static if" and no apocalypse has yet happened.

Well, we are yet to define "static if" when it comes to tricky cases, i.e. cases where static ifs and mixins have interdependencies.

http://wiki.dlang.org/DIP31

Would be good to have a resolution on this.
September 13, 2014
On 09/14/2014 01:21 AM, Peter Alexander wrote:
> On Saturday, 13 September 2014 at 22:25:57 UTC, Walter Bright wrote:
>> Yeah, well, we have many years of experience with "static if" and no
>> apocalypse has yet happened.
>
> Well, we are yet to define "static if" when it comes to tricky cases,
> i.e. cases where static ifs and mixins have interdependencies.
>
> http://wiki.dlang.org/DIP31
>
> Would be good to have a resolution on this.

Note that DIP31 is quite weak because 'order of appearance in the source' is not well-defined for constructs appearing in files that cyclically import each other and the 'poison mode' is IMO enabled too often.

However, I get quite promising results using explicit dependency tracking, running analysis until it is stuck on symbol lookup and then poisoning the symbols in the topmost strongly connected component of the dependency graph. I still need to find a good way to make nested template instantiation fast enough with this approach though.
September 14, 2014
On 09/13/2014 10:10 PM, eles wrote:
> ...
> But the surprise comes at the end (slide 57), where he also
> criticizes... the static if ...
>
> Are those points valid?:
> ...
> • Unstructured, can do everything (just like goto)
> • Complicates static analysis (AST-based tools get hard to write)
> • Blocks the path for concepts
> • Specifies how things are done (implementation)
> • Is three slightly different “ifs” using a common syntax
> • Redefines the meaning of common notation (such as { ... })

In D, { ... } has this other meaning even without static if and I would say similar syntax rather than common syntax and leave out the pointless reference to goto.

Otherwise, yes. In exchange you get static if. :o)

However, as Peter points out, static if as implemented in DMD currently has some serious issues:

static if(!is(typeof(x))) enum y=2;
static if(!is(typeof(y))) enum x=1;

This code is ambiguous: It could define either x or y.

If the two static if's are defined in different modules that import each other, then the order those modules are passed to DMD on the command line can influence which of x or y ends up being defined.

The problem is that DMD does not seem to have a coherent way of resolving dependencies. (My own project does not compile with versions of DMD after 2.060, and even with 2.060, I had to move code around randomly. I think it will be easily fixed to compile again only when analysis dependency management is fixed in a good enough way.)

« First   ‹ Prev
1 2 3 4 5