September 21, 2014
On Sunday, 21 September 2014 at 22:41:04 UTC, H. S. Teoh via Digitalmars-d wrote:
> with, and you'd have to explicitly ask for impure / mutable

"Impure" should be on parameters so you can do dataflow in the presence of FFI.

So you basically need better mechanisms.

But then you have to analyze the needs first (e.g. the desirable semantics that currently are avoided) All of then.

Adding one hack after the other is not the best approach.



September 21, 2014
On Sun, Sep 21, 2014 at 10:57:34PM +0000, Ola Fosheim Grostad via Digitalmars-d wrote:
> On Sunday, 21 September 2014 at 22:41:04 UTC, H. S. Teoh via Digitalmars-d wrote:
> >with, and you'd have to explicitly ask for impure / mutable
> 
> "Impure" should be on parameters so you can do dataflow in the presence of FFI.
> 
> So you basically need better mechanisms.
> 
> But then you have to analyze the needs first (e.g. the desirable semantics that currently are avoided) All of then.
> 
> Adding one hack after the other is not the best approach.
[...]

Eventually the real solution is automatic inference, with the user using explicit attributes at the top-level where they are desired, and the compiler will take care of the rest.


T

-- 
Creativity is not an excuse for sloppiness.
September 21, 2014
On Sunday, 21 September 2014 at 23:04:22 UTC, H. S. Teoh via Digitalmars-d wrote:
> Eventually the real solution is automatic inference, with the user
> using explicit attributes at the top-level where they are desired, and
> the compiler will take care of the rest.

Yes, but you need a model of the semantics you are looking for.
September 22, 2014
On 21 September 2014 15:54, Andrei Alexandrescu via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> On 9/21/14, 1:27 AM, ponce wrote:
>>
>> On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>>>
>>>
>>> What do you think are the worst parts of D?
>>>
>>
>> Proper D code is supposed to have lots of attributes (pure const nothrow @nogc) that brings little and makes it look bad.
>
>
> No because deduction. -- Andrei

Agreed.  The time when you want to explicitly use these attributes is if you want to enforce @nogc, pure ...

As it turns out, it is a good idea to enforce these from the start, rather than after you've written your program.

Iain
September 22, 2014
"Timon Gehr"  wrote in message news:lvmh5b$eo9$1@digitalmars.com... 

> When was int x(T)=2; introduced?

At the same time as enum x(T) = 2; I think.

> Also, C-style array syntax would actually be string results(T)[] = "";.

Nah, array type suffix goes before the template argument list.
September 22, 2014
On 09/22/2014 03:26 PM, Daniel Murphy wrote:
> "Timon Gehr"  wrote in message news:lvmh5b$eo9$1@digitalmars.com...
>> When was int x(T)=2; introduced?
>
> At the same time as enum x(T) = 2; I think.
> ...

Is this documented?

>> Also, C-style array syntax would actually be string results(T)[] = "";.
>
> Nah, array type suffix goes before the template argument list.

It is results!T[2], not results[2]!T.
September 22, 2014
On Saturday, 20 September 2014 at 14:22:32 UTC, Tofu Ninja wrote:
> On Saturday, 20 September 2014 at 13:30:24 UTC, Ola Fosheim Grostad wrote:
>> On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>>> What do you think are the worst parts of D?
>>
>> 1. The whining in the forums.
>>
>> 2. Lacks focus on a dedicated application area.
>>
>> 3. No strategy for getting more people on board.
>>
>> 4. No visible roadmap.
>
> Not really a problem with the language. Just problems.
>
>> 5. Too much focus on retaining C semantics (go does a bit better)
>>
>> 6. Inconsistencies and hacks (too many low hanging fruits)
>>
>> 7. More hacks are being added rather than removing existing ones.
>
> Definitely can agree, I think it has to do with the sentiment that it is "too much like C++"

It's really needed to keep C++-compatible as possible otherwise too few people are going to use it. If C++ wasn't C-compatible do you think it would be a successfully language it is today? I don't think so.
September 22, 2014
On Sunday, 21 September 2014 at 22:17:59 UTC, H. S. Teoh via Digitalmars-d wrote:
> On Sun, Sep 21, 2014 at 08:49:38AM +0000, via Digitalmars-d wrote:
>> On Sunday, 21 September 2014 at 00:07:36 UTC, Vladimir Panteleev wrote:
>> >On Saturday, 20 September 2014 at 12:39:23 UTC, Tofu Ninja wrote:
>> >>What do you think are the worst parts of D?
>> >
>> >The regressions!
>> >
>> >https://issues.dlang.org/buglist.cgi?bug_severity=regression&list_id=106988&resolution=---
>> >
>> >I filed over half of those...
>> 
>> I guess you found them using your own code base? Maybe it would make
>> sense to add one or more larger projects to the autotester, in
>> addition to the unit tests. They don't necessarily need to be
>> blocking, just a notice "hey, your PR broke this and that project"
>> would surely be helpful to detect the breakages early on.
>
> This has been suggested before. The problem is resources. If you're
> willing to donate equipment for running these tests, it would be greatly
> appreciated, I believe.
>
> For my part, I regularly try compiling my own projects with git HEAD,
> and filing any regressions I find.
>
>
> T

What is needed?
September 22, 2014
On Mon, 22 Sep 2014 14:28:47 +0000
AsmMan via Digitalmars-d <digitalmars-d@puremagic.com> wrote:

> It's really needed to keep C++-compatible as possible otherwise too few people are going to use it. If C++ wasn't C-compatible do you think it would be a successfully language it is today? I don't think so.
D is not c++-compatible anyway. and talking about compatibility: it's what made c++ such a monster. if someone wants c++ he knows where to download c++ compiler.

the last thing D should look at is c++.


September 22, 2014
On 9/22/14, 1:44 PM, ketmar via Digitalmars-d wrote:
> On Mon, 22 Sep 2014 14:28:47 +0000
> AsmMan via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
>
>> It's really needed to keep C++-compatible as possible otherwise
>> too few people are going to use it. If C++ wasn't C-compatible do
>> you think it would be a successfully language it is today? I
>> don't think so.
> D is not c++-compatible anyway.

D is ABI- and mangling-compatible with C++.

> and talking about compatibility: it's
> what made c++ such a monster. if someone wants c++ he knows where to
> download c++ compiler.
>
> the last thing D should look at is c++.

Well what can I say? I'm glad you're not making the decisions.


Andrei