On Friday, 23 June 2017 at 18:51:13 UTC, Anonymouse wrote:
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
-
On Thu, Jun 22, 2017 at 12:48:25AM +, Seb via Digitalmars-d wrote:
> Hi,
>
> I am currently trying to modernize the D code example roulette on the
> dlang.org front page [1]. Hence, I would love to hear about your
> favorite feature(s) in D.
> Ideas:
> - favorite language construct
> -
On Fri, Jun 23, 2017 at 06:51:13PM +, Anonymouse via Digitalmars-d wrote:
[...]
> Fairly specific, but foreach (member; someStruct.tupleof).
>
> Part of my work on my IRC bot has been to serialise structs into
> configuration files (since std.json was *non-trivial* to deal with),
> and
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Before you ask, yes - I want to add a couple of cool examples
to dlang.org (and yep the roulette rotation is currently broken
[2]).
[1]
https://github.com/dlang/dlang.org/pulls?q=is%3Apr+is%3Aopen+label%3A%22Frontpage+example%22
[2]
UDA snippet:
class MyView : View {
@ViewWidget Button okButton;
@ViewWidget("cancelButton") Button myButton;
@GroupViewWidgets Button[3] buttons;
@OnClickListener("okButton")
void onOkButtonClick(Widget widget) {
...
}
@Shortcut("TestGroup.cancel")
void
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 07:00:17 UTC, Seb wrote:
Thanks a lot, but I was looking for small snippets (< 10 LoC)
than could be used to show the awesomeness of D at the roulette
enum E {IN = -1, V1, V2, V3, X1 }
mixin({
string code = "enum EBIT : ulong { "~
Thanks a lot, but I was looking for small snippets (< 10 LoC)
than could be used to show the awesomeness of D at the roulette
on https://dlang.org
Any chance you could make your point a bit conciser? :)
I agree with you, indeed it is much too long for a carousel ;)
And it should be made even
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
I think "alias this" is a good
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
I would love to hear about your favorite feature(s) in D.
Arrays include length along with the pointer.
Very easy built-in array support with foreach
Ranges, that don't treat their input types as 'pointers' and get
all levels of
On Thursday, 22 June 2017 at 08:52:27 UTC, qznc wrote:
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
[...]
H. S. Teoh calendar:
https://wiki.dlang.org/Component_programming_with_ranges
[...]
Yes that's a great example, but sadly not standalone - we can
only use Phobos for the
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 07:10:14 UTC, Seb wrote:
Nice list, but I was actually looking for more concise,
actionable snippets or idea(s) for such.
There are some real gems in this DConf Talk:
https://www.youtube.com/watch?v=yMNMV9JlkcQ
I started enumerating them on the Wiki here
On Thursday, 22 June 2017 at 01:00:42 UTC, Mike wrote:
Beginning with most favorite:
- CTFE
- static if - If you don't consider that part of CTFE
- Template Mixins
- Templates - Pretty much goes along with the top 2
- String Mixins
- Unit Tests
DIP1000 may make that list too, if I ever
On Thursday, 22 June 2017 at 06:08:07 UTC, Paulo Pinto wrote:
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
-
On Thursday, 22 June 2017 at 06:02:54 UTC, bauss wrote:
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
-
On Thursday, 22 June 2017 at 06:27:11 UTC, Ecstatic Coder wrote:
Absolutely no syntactic noise !!!
This is often overlooked, while D easily beats all its direct
competitors (C++, Java, C#, etc) on that point.
Just try to implement the same code as simply in C++ and you
will be convinced
Lack of verbosity.
Clear concise code, thanks to the automatic initialization of
class members, native strings/arrays/maps/slices, UFCS,
declaration-order independence, etc.
class TOTO
{
bool IsCool;
int Age;
TUTU[] Tutus;
TOTO[string] Totos;
void Foo( TUTU tutu )
{
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
"friendship ".writeln = ((_) => "is"~_)(" magic");
"friendship ".writeln = ((_) => "is"~_)(" magic");
just couldn't resist the temptaion, sorry.
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
A couple more:
- std.conv.to - Safe, convenient conversions that just
On Thursday, 22 June 2017 at 01:42:10 UTC, Brad Anderson wrote:
A very simple vibe app could be added using dub's single-file
package format.
Hmm this is a great idea, but it wouldn't be "runnable" on the
web.
Here's a PR for discussion:
https://github.com/dlang/dlang.org/pull/1763
On Thursday, 22 June 2017 at 01:13:43 UTC, H. S. Teoh wrote:
Slices! And preferably in an example where it beats C
performance by not needing to duplicate strings everywhere.
There's one in the queue, feel free to vote for or destroy it:
https://github.com/dlang/dlang.org/pull/1756
Built-in
On Thursday, 22 June 2017 at 01:13:43 UTC, H. S. Teoh wrote:
On Thu, Jun 22, 2017 at 12:48:25AM +, Seb via Digitalmars-d
wrote:
[snip]
Slices! And preferably in an example where it beats C
performance by not needing to duplicate strings everywhere.
...
For slices the example in blog
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
Hi,
I am currently trying to modernize the D code example roulette
on the dlang.org front page [1]. Hence, I would love to hear
about your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only
On Thu, Jun 22, 2017 at 12:48:25AM +, Seb via Digitalmars-d wrote:
> Hi,
>
> I am currently trying to modernize the D code example roulette on the
> dlang.org front page [1]. Hence, I would love to hear about your
> favorite feature(s) in D.
>
> Ideas:
> - favorite language construct
> -
My fav is that familiar code just works.
On Thursday, 22 June 2017 at 00:48:25 UTC, Seb wrote:
I would love to hear about your favorite feature(s) in D.
Beginning with most favorite:
- CTFE
- static if - If you don't consider that part of CTFE
- Template Mixins
- Templates - Pretty much goes along with the top 2
- String Mixins
Hi,
I am currently trying to modernize the D code example roulette on
the dlang.org front page [1]. Hence, I would love to hear about
your favorite feature(s) in D.
Ideas:
- favorite language construct
- favorite code sample
- "only possible in D"
Before you ask, yes - I want to add a couple
33 matches
Mail list logo