January 11, 2015 Re: D idioms list | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sat, 2015-01-10 at 14:13 -0800, Walter Bright via Digitalmars-d-announce wrote: > On 1/10/2015 1:28 PM, weaselcat wrote: > > Sorry for the off-topic noise, but where will you be publishing > > your articles > > since Dr.Dobbs has closed? > > > > Sorry if you have answered this elsewhere. > > It's a good question. Dr. Dobb's has graciously given me permission > to republish > them, and I'll post them on http://digitalmars.com/articles. As you > can see, > I've already done a few of them. Lots more to go. Feel free to send stuff to ACCU's CVu or Overload. http://accu.org/index.php/journal -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder |
January 11, 2015 Re: D idioms list | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | On 1/11/2015 4:24 AM, Russel Winder via Digitalmars-d-announce wrote:
> Feel free to send stuff to ACCU's CVu or Overload.
>
> http://accu.org/index.php/journal
Good idea!
|
January 15, 2015 Re: D idioms list | ||||
---|---|---|---|---|
| ||||
Posted in reply to ponce | For optimal AA lookup, this idiom is also nice if you only need the result for one line: if (auto found = key in AA) do_stuff (found); |
January 15, 2015 Re: D idioms list | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vlad Levenfeld | On Thursday, 15 January 2015 at 06:02:13 UTC, Vlad Levenfeld wrote:
> For optimal AA lookup, this idiom is also nice if you only need the result for one line:
>
> if (auto found = key in AA)
> do_stuff (found);
Having a declaration in an "if" could be another entry together with:
if (auto inst = cast(SubClass)myObject)
do_stuff(inst);
How to do "instanceof" is quite a common question on IRC.
|
March 09, 2016 Re: D idioms list | ||||
---|---|---|---|---|
| ||||
Posted in reply to ponce | For optimal AA lookup, this idiom is also nice if you only need the result for one line: if (auto found = key in AA) do_stuff (found); http://idioms.in/ |
Copyright © 1999-2021 by the D Language Foundation