Thread overview
D-ideas collection
Aug 27, 2016
Suliman
Aug 27, 2016
ag0aep6g
Aug 27, 2016
Seb
Aug 27, 2016
Basile B.
Aug 27, 2016
cy
August 27, 2016
We already have DIPs, but I think we should have place for collecting good ideas that can be integrated in D. Most people from here prefer posting it's on forum, but such topics (like ideas from new version of C#) is go down in few days.

Fro example now I read about interesting future in Dart:
With 1.19 we introduce support for an optional trailing comma after the last argument of a call and the last parameter of a function declaration. This makes code editing much easier:
https://2.bp.blogspot.com/-kVBJlnXby54/V8DJqaZsvwI/AAAAAAAANeU/suPDhaZcdsEvN1DuYy8669JJ-W6x1zX1wCLcB/s1600/ReorderCode.gif

And I do not know where to post it.
August 27, 2016
On 08/27/2016 07:08 PM, Suliman wrote:
> Fro example now I read about interesting future in Dart:
> With 1.19 we introduce support for an optional trailing comma after the
> last argument of a call and the last parameter of a function
> declaration. This makes code editing much easier:
> https://2.bp.blogspot.com/-kVBJlnXby54/V8DJqaZsvwI/AAAAAAAANeU/suPDhaZcdsEvN1DuYy8669JJ-W6x1zX1wCLcB/s1600/ReorderCode.gif
>
>
> And I do not know where to post it.

We already got that in D.
August 27, 2016
On Saturday, 27 August 2016 at 17:08:33 UTC, Suliman wrote:
> And I do not know where to post it.

A couple of ideas:

- In general the Wiki (http://wiki.dlang.org/) is a good place to keep information for a longer time, however I couldn't find a good spot on a first glance.

- You could also make a Github repo like
  - https://github.com/zhaopuming/awesome-d (uses the README.md)
  - https://github.com/isaacs/github (= use the issue tracker)

- The Bug Tracker (https://issues.dlang.org/) has a category "enhancement requests"
August 27, 2016
On Saturday, 27 August 2016 at 17:08:33 UTC, Suliman wrote:
> We already have DIPs, but I think we should have place for collecting good ideas that can be integrated in D.

This is called "enhancement" on bugzilla:

https://issues.dlang.org/buglist.cgi?bug_status=NEW&component=dmd&f1=bug_severity&limit=0&list_id=210279&o1=equals&order=priority%2Cbug_severity&product=D&query_format=advanced&resolution=---&v1=enhancement

https://issues.dlang.org/buglist.cgi?bug_status=NEW&component=phobos&f1=bug_severity&limit=0&list_id=210279&o1=equals&order=priority%2Cbug_severity&product=D&query_format=advanced&resolution=---&v1=enhancement


August 27, 2016
D syntax improvement ideas, huh?

Make UFCS work for locally defined functions, with a pragma or something, because it can confuse people, but it can also be useful for state machines on ranges, and to avoid cluttering up module namespaces.

Pass a block of code as an argument, outside the parentheses. like foo!(bar,baz) { stuff } would be defined as template foo(bar,baz,block stuff) { ... } or something.

(incidentally you can sort of do this already, for instance by making a struct that completes evaluation after you call opBinary(string op, void delegate()) if op == "|", then makestruct(foo,bar) | { stuff })

Allow struct initializers to construct function arguments. I mean, seriously. We already practically have support for keyword arguments, except for this.

void foo(Something info) {...}

foo({
  arg: 23,
  arg2: 42,
  keyword: value
});

I dunno, optional parentheses if there's just one argument? So you could do void foo(void delegate() bar) { ... } then just foo { stuff } instead of foo({ stuff })