Thread overview | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 08, 2014 Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
I've started to make some minor mods to the DMD parser to tailor it to my own taste, but there is no reason to do double work, even if experimental. So I wonder which patches are available or in the works by others? I'm currently working on the following mods (not thoroughly tested yet): in : templatename‹params› out: templatename!(params) in : templatename«params» out: templatename!"params" in : a := expr out: auto a = expr in : a :== expr out: immutable a = expr And plan to continue with: in : √x+y out: sqrt(x) + y in : a•b out: a.opInner(b) // dot product, maybe some other name? in : #arr; out: arr.length //or perhaps something more generic? What are you working on and what patches do you have? What kind of syntactical sugar do you feel is missing in D? |
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Monday, 8 September 2014 at 08:51:10 UTC, Ola Fosheim Grøstad wrote:
> I've started to make some minor mods to the DMD parser to tailor it to my own taste, but there is no reason to do double work, even if experimental. So I wonder which patches are available or in the works by others?
>
> I'm currently working on the following mods (not thoroughly tested yet):
>
> in : templatename‹params›
> out: templatename!(params)
>
> in : templatename«params»
> out: templatename!"params"
>
> in : a := expr
> out: auto a = expr
>
> in : a :== expr
> out: immutable a = expr
>
> And plan to continue with:
>
> in : √x+y
> out: sqrt(x) + y
>
> in : a•b
> out: a.opInner(b) // dot product, maybe some other name?
>
> in : #arr;
> out: arr.length //or perhaps something more generic?
>
> What are you working on and what patches do you have?
>
> What kind of syntactical sugar do you feel is missing in D?
You really do hate portability, don't you?
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Monday, 8 September 2014 at 08:51:10 UTC, Ola Fosheim Grøstad wrote:
> I've started to make some minor mods to the DMD parser to tailor it to my own taste, but there is no reason to do double work, even if experimental. So I wonder which patches are available or in the works by others?
>
> I'm currently working on the following mods (not thoroughly tested yet):
>
> ...
Good list of changes I'd love to never see the public exposures to prevent even smallest chance someone will actually use it :P
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Idan Arye | On Monday, 8 September 2014 at 09:23:42 UTC, Idan Arye wrote:
> You really do hate portability, don't you?
I didn't ask about hatred. I asked about what is available so I don't replicate the efforts of others.
Besides, it is fully portable since it is compiling to the same AST (as of today).
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Monday, 8 September 2014 at 09:26:23 UTC, Dicebot wrote:
> Good list of changes I'd love to never see the public exposures to prevent even smallest chance someone will actually use it :P
Good for you, but please answer the question…?
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | "Ola Fosheim Grøstad" " wrote in message news:adjmadefxvblysylyvto@forum.dlang.org... > I've started to make some minor mods to the DMD parser to tailor it to my own taste, but there is no reason to do double work, even if experimental. So I wonder which patches are available or in the works by others? Attempting to fork D's syntax is harmful to D. Please stop. |
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad Attachments: | On Mon, 08 Sep 2014 08:51:09 +0000
via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> What are you working on and what patches do you have?
lexer:
* stop validating UTF-8 in comments
* native-encoded strings (n"...")
parser:
* foreach (auto n; ...)
* foreach (auto; ...)
* foreach (; ...)
* lambdas: (auto, auto) => ...
* @pure, @nothrow
* safe, trusted (w/o '@')
* "kill-the-commas"
* "kill-c-arrays"
* @virtual (yes, i remember the discussion, but i NEED a way to revert
"final:"!) semiworking
* @nonstatic (for the same reason as @virtual) semiworking
* planing: @gc and @throw (for the same reason again)
* ...and maybe generic [@]!... (!final, !static, @!nogc and so on)
now i'm trying to dive into semantic parts of the compiler to increase area of wreckage.
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad Attachments: | On Mon, 08 Sep 2014 08:51:09 +0000
via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> in : #arr;
> out: arr.length //or perhaps something more generic?
why not '$arr'? '$' is already established for 'length'.
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy Attachments: | On Mon, 8 Sep 2014 19:37:22 +1000
Daniel Murphy via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> Attempting to fork D's syntax is harmful to D. Please stop.
it's easy: just close the code. this will effectively stop people who want to experiment.
|
September 08, 2014 Re: Which patches/mods exists for current versions of the DMD parser? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Monday, 8 September 2014 at 09:31:06 UTC, Ola Fosheim Grøstad wrote:
> On Monday, 8 September 2014 at 09:26:23 UTC, Dicebot wrote:
>> Good list of changes I'd love to never see the public exposures to prevent even smallest chance someone will actually use it :P
>
> Good for you, but please answer the question…?
I submit all changes, even experimental ones, as pull request. If it is not good / widely useful enough to have a change of being accepted upstream I won't even bother thinking about design, not even speaking about keeping local patches.
And if at some point I will want to create my own language I'll definitely use something other than DMD as a base.
|
Copyright © 1999-2021 by the D Language Foundation