Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
January 16, 2015 [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional refactoring? -- Andrei |
January 16, 2015 Re: [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Friday, 16 January 2015 at 20:50:22 UTC, Andrei Alexandrescu wrote: > Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional refactoring? -- Andrei Does it support things like: `log n$(SUBSCRIPT c)` ? Here's my go at it: https://github.com/D-Programming-Language/phobos/pull/2877 |
January 16, 2015 Re: [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 1/16/15 12:58 PM, Vladimir Panteleev wrote: > On Friday, 16 January 2015 at 20:50:22 UTC, Andrei Alexandrescu wrote: >> Now that Adam's work on transforming `code` into $(D code) is in, >> who'd want to write the glorious sed --in-place expression that >> transforms Phobos? Or should we just leave it for future code and >> occasional refactoring? -- Andrei > > Does it support things like: `log n$(SUBSCRIPT c)` ? That should work as long as all is on the same line. > Here's my go at it: > https://github.com/D-Programming-Language/phobos/pull/2877 Thanks! Please make sure you test things. Andrei |
January 16, 2015 Re: [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Fri, Jan 16, 2015 at 12:50:21PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: > Now that Adam's work on transforming `code` into $(D code) is in, who'd want to write the glorious sed --in-place expression that transforms Phobos? Or should we just leave it for future code and occasional refactoring? -- [...] How does it handle code fragments that use `...` literals? T -- Don't throw out the baby with the bathwater. Use your hands... |
January 16, 2015 Re: [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On 1/16/15 1:59 PM, H. S. Teoh via Digitalmars-d wrote:
> On Fri, Jan 16, 2015 at 12:50:21PM -0800, Andrei Alexandrescu via Digitalmars-d wrote:
>> Now that Adam's work on transforming `code` into $(D code) is in,
>> who'd want to write the glorious sed --in-place expression that
>> transforms Phobos? Or should we just leave it for future code and
>> occasional refactoring? --
> [...]
>
> How does it handle code fragments that use `...` literals?
Adam? Or just try it. -- Andrei
|
January 17, 2015 Re: [WORK] Backtick dat code? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | On 16/01/15 21:58, Vladimir Panteleev via Digitalmars-d wrote:
> On Friday, 16 January 2015 at 20:50:22 UTC, Andrei Alexandrescu wrote:
>> Now that Adam's work on transforming `code` into $(D code) is in, who'd want
>> to write the glorious sed --in-place expression that transforms Phobos? Or
>> should we just leave it for future code and occasional refactoring? -- Andrei
>
> Does it support things like: `log n$(SUBSCRIPT c)` ?
Great to hear that Adam's feature landed :-)
Along similar lines, it would be really nice if there were some way in Ddoc of indicating, "This next bit of ddoc contains no macros nor any Ddoc special characters and should be taken literally as is."
I don't know if this fits with the design, but suppose that ``something`` were to be taken as "something should be interpreted literally as-is". So then,
```this_bit_of_code() { ... }``` would be interpreted as code that internally contains no Ddoc macros or special characters, while ``this would be literally-interpreted text`` and `this_code() { $(B can_contain;) ddoc_macros; }`.
|
Copyright © 1999-2021 by the D Language Foundation