June 05, 2013
On Thursday, 30 May 2013 at 13:13:02 UTC, MrzlganeE wrote:
> I hate you all, and with this, I exit the D community

ooo, a sensitive troll...

There was a time when D didn't have the sugary lambda syntax: "=>"
I think that turned out nicely.
(maybe someone already mentioned this in the thread, didn't see it)

I'm also in favor of ":="


June 06, 2013
On Friday, 31 May 2013 at 00:57:33 UTC, Minas Mina wrote:
> I don't think this is useful.
>
> At least when I see "auto" in the code I immediately understand what's going on, whereas with this proposal I have to double check my code to see if it's ":=" or "=".

First off, I write a _lot_ of Go code, and I _love_ the := there. It makes things nice and simple, and it fits nicely into the rest of the Go syntax. However, I don't think it belongs in D because it changes the flow of the code.

The problem is where type specifiers are expected to go. In D (and most other C-like languages), types go before the identifiers:

    int x, y, z;

When scanning code, if I see a type identifier, I know it's declaring something. I immediately know the scope and all is well.

In Go, types go after the identifiers:

    func example(x, y, z int) {}

This is only broken by var|type, which are completely different expressions.

For Go, the := makes perfect sense, because when you read Go code, you expect the identifier first, then the type. In D however, nothing else (correct me if I'm wrong) has this syntax.

I have no problem with the := syntax, I just think it doesn't make syntactic sense. It subtly breaks the idioms of the language, all for very little gain.

I would be okay with type blocks, or the presented math {} block (which could do all sorts of new and exciting things) because that would fit more nicely into the language.

If the OP really wants this, he/she can easily write a pre-processor for D code that he/she uses on his/her own personal projects. A completely untested regex:

    rsync src compilable-source
    find compilable-source/ -name "*.d" -exec sed -i "s/\(\\w+\)\\s*:=/auto \1 =/g" {}+

There, feature done in two lines of shell...
June 06, 2013
On Thursday, 6 June 2013 at 16:06:44 UTC, Tyler Jameson Little wrote:
> On Friday, 31 May 2013 at 00:57:33 UTC, Minas Mina wrote:
>> I don't think this is useful.
>>
>> At least when I see "auto" in the code I immediately understand what's going on, whereas with this proposal I have to double check my code to see if it's ":=" or "=".
>
> First off, I write a _lot_ of Go code, and I _love_ the := there. It makes things nice and simple, and it fits nicely into the rest of the Go syntax. However, I don't think it belongs in D because it changes the flow of the code.
>
> The problem is where type specifiers are expected to go. In D (and most other C-like languages), types go before the identifiers:
>
>     int x, y, z;
>
> When scanning code, if I see a type identifier, I know it's declaring something. I immediately know the scope and all is well.
>
> In Go, types go after the identifiers:
>
>     func example(x, y, z int) {}
>
> This is only broken by var|type, which are completely different expressions.
>
> For Go, the := makes perfect sense, because when you read Go code, you expect the identifier first, then the type. In D however, nothing else (correct me if I'm wrong) has this syntax.
>
> I have no problem with the := syntax, I just think it doesn't make syntactic sense. It subtly breaks the idioms of the language, all for very little gain.

So maybe =: for D? :P
Naa, just kidding.
>
> I would be okay with type blocks, or the presented math {} block (which could do all sorts of new and exciting things) because that would fit more nicely into the language.
>
> If the OP really wants this, he/she can easily write a pre-processor for D code that he/she uses on his/her own personal projects. A completely untested regex:
>
>     rsync src compilable-source
>     find compilable-source/ -name "*.d" -exec sed -i "s/\(\\w+\)\\s*:=/auto \1 =/g" {}+
>
> There, feature done in two lines of shell...

+1

AFAIK Namespace (user with such nickcname) already wrote preprocesor for D with syntax candies he likes.

I bet if math guys were so interested in D they would do the same at some point.

I personally don't care about that :=. Probably won't use as I am already familiar and fine with auto. I believe though that letting achieving same thing in different ways will just bring troubles.
June 06, 2013
On Thursday, 30 May 2013 at 11:41:34 UTC, MrzlganeE wrote:

> To me, 'auto' has a price. The price is a foreign word being inserted into my math. It's an invasive term. It ruins the beautiful expression.

And tomorrow, you'll complain that := has a foreign character into your math, because everywhere else, you use = and there is no reason for the first equal sign to add : in front of it.
June 06, 2013
On Thursday, 30 May 2013 at 19:11:10 UTC, MrzlganeE wrote:
> And the alternative:
>
> x, y, z := f(), g(), h();

Right, now you want to add Python features to D. Why don't you design your own language instead ?
November 02, 2013
take my vote on both this, and SciD

..

Contact me please, if  SciD is still a project in Hand.
1 2 3 4 5 6 7 8 9 10
Next ›   Last »