Re: D equivalent of Python's try..else

2015-11-22 Thread Kagamin via Digitalmars-d-learn
On Saturday, 21 November 2015 at 13:57:01 UTC, Shriramana Sharma wrote: Hmm – I forgot Python has `else` for `for` and `while` too. But it's a tad difficult to wrap one's mind around the meaning of the word `else` in this particular context whereas it actually means `nobreak`. In a way `for`

simple newbie question

2015-11-22 Thread fred via Digitalmars-d-learn
Hi. Dll or shared library is important feature of software development. So why most d library still static link. I am sorry for my stupid question. Thanks.

Re: D equivalent of Python's try..else

2015-11-22 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 22, 2015 07:41:40 Mike Parker via Digitalmars-d-learn wrote: > On Saturday, 21 November 2015 at 13:57:01 UTC, Shriramana Sharma > wrote: > > > > Hmm – I forgot Python has `else` for `for` and `while` too. But > > it's a tad difficult to wrap one's mind around the meaning of > >

simple newbie question

2015-11-22 Thread fred via Digitalmars-d-learn
How to generate temporary files so compilation time speeds up. Normal compilation only produce obj, exe. If what i mean is that if we compile the files that unchanged, dmd will look for that temporary files instead of .d files.

Re: D equivalent of Python's try..else

2015-11-22 Thread Kagamin via Digitalmars-d-learn
As an idiomatic option there can be `finally(exit)`, `finally(success)` and `finally(failure)` that would mirror semantics of scope guards.

Re: D equivalent of Python's try..else

2015-11-22 Thread rsw0x via Digitalmars-d-learn
On Sunday, 22 November 2015 at 10:01:48 UTC, Kagamin wrote: As an idiomatic option there can be `finally(exit)`, `finally(success)` and `finally(failure)` that would mirror semantics of scope guards. how does this differ from just putting a scope(failure) inside the try block? it only trigger

Re: simple newbie question

2015-11-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 22 November 2015 at 09:41:42 UTC, fred wrote: So why most d library still static link. It generally results in smaller and faster distributions and less hassle for the typical D use case today.

Re: simple newbie question

2015-11-22 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 22 November 2015 at 09:55:10 UTC, fred wrote: How to generate temporary files so compilation time speeds up. Normal compilation only produce obj, exe. If what i mean is that if we compile the files that unchanged, dmd will look for that temporary files instead of .d files. The .d

Re: DFLAGS ignored. How to get a dmd installation on windows that is 64 bit only

2015-11-22 Thread Carl Sturtivant via Digitalmars-d-learn
If you must force dmd to be only 64bit, use sc.ini file to do so and not rely on your environment variables. OK, why? (This does work, so thank you.) Also why do you not want 32-bit support? It's not like it won't work on a 64bit computer, it will. I've used 32-bit D and DMC a lot on real

Re: "final" as function parameter attribute?

2015-11-22 Thread Johan Engelen via Digitalmars-d-learn
On Sunday, 22 November 2015 at 00:21:29 UTC, Jonathan M Davis wrote: Neither auto nor final is valid on a function parameter, so either the grammar is wrong, or InOutX is not used for function parameters. But looking at that page, I'd have to spend a fair bit of time working through it to fig

regex format string problem

2015-11-22 Thread yawniek via Digitalmars-d-learn
hi! how can i format a string with captures from a regular expression? basically make this pass: https://gist.github.com/f17647fb2f8ff2261d42 context: i'm trying to write a implementation for https://github.com/ua-parser where the regular expression as well as the format strings are given.

Re: regex format string problem

2015-11-22 Thread Rikki Cattermole via Digitalmars-d-learn
On 23/11/15 12:41 PM, yawniek wrote: hi! how can i format a string with captures from a regular expression? basically make this pass: https://gist.github.com/f17647fb2f8ff2261d42 context: i'm trying to write a implementation for https://github.com/ua-parser where the regular expression as wel