New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.0 Feature List #115
Comments
I've starting working on a possible new parser: https://git.vpzom.click/vpzom/doge3 |
Neat! I see you have to assign a lot of function calls to variables before using them. I’m hoping the work in 2.4 will let us get around that! Are there any missing features not in 2.4 that you noticed? |
The biggest issue I had was that function calls don't work in |
Yeah, I’m still trying to work out in my head how to recurse parse plz and stuff on those rly/notrly sections with the ‘is’ ambiguity and also with plz and dose consuming all tokens to the right. Might have to fix the hungry hungry parsing for those functions to support stuff like:
EDIT We might get around it by either adding
|
@pholey might be interested in the parser as well. |
Regarding function call termination: |
What would you suggest as a complement for I guess
Could also be:
thx seems a bit more obvious, perhaps we can keep it to facilitate chained calls more than relying on checking if the last char is &. |
|
There are a few ambiguities that I'd like to solve in 3.0. 1.
|
Let me mull over 1 for a bit.
For two, could we make a distinction between postfix and prefix with
bigify (identifier) - prefix
(Identifier) bigified - postfix
Ify applies to next , ified applies to previous?
…On Fri, Dec 21, 2018 at 09:56 vpzomtrrfrt ***@***.***> wrote:
There are a few ambiguities that I'd like to solve in 3.0.
1. wow returns
plz doThing with 'doge' much result
console dose loge with result
wow 'another value'
Could be interpreted as either:
doThing('doge', function(result) {
console.log(result);
}, 'another value');
or:
doThing('doge', function(result) {
console.log(result);
return 'another value';
});
In 2.x, we also require wow& *before* the return value, which adds
another possible interpretation if used that way.
This also adds additional complexity to the parser, as nothing I've done
so far has involved optional expressions.
To solve this, we could:
- Disallow wow-returns for anonymous functions, and determine intent
based on the presence of a newline after the closing wow
- Add a required token between wow and the return value, maybe with?
- Define precedence so at least there *is* an answer, even if unclear
to the reader
- Remove the feature altogether, and use regular return statements (I
don't think these exist yet, but I think they should for early returns
anyway)
- Anything else?
2. bigify/smallify
These operators are allowed to appear either before or after their
operand. However, due to our lack of separation between values, this
introduces an ambiguity, since plz foo with bar bigify baz could be
parsed as either foo(bar++, baz) or foo(bar, ++baz).
Perhaps we should drop the postfix option. That would clear up this issue,
and I feel that the prefix option is more doge-like. The functional
difference between them only matters when using them as expressions, which
tends to result in confusing code.
These are the issues I've come up with so far, but there are probably
others
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#115 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADUDwSRsqYmyUtFTFALJXIwlegpZY6n2ks5u7QTIgaJpZM4P0yCm>
.
|
That would work, though I wonder if that sounds more like |
For wow
I like the thought of having a clearer return and not mangling so:
Would yield:
And
Creates:
I guess another suggestion would be to use
vs
And even more confusing....
To produce:
|
One thought I had was to reuse |
Yeah, i'd like to not have overlap for 3.0, that If |
Is this supposed to be closed? |
No..... darn it i must have put Fixes ID in my PR :( |
5evar is now supported in the 3.x parser |
|
I don't think merging with DSON is viable, since all of the keywords are already doing wildly different things |
Placeholder to link all the other currently open issues planned for 3.0 that existed pre-revive.
The 3.0 parser should be written in dogescript (#96)
const
=>5evar
,
=>also
(Check for operators in whitespace sensitive parameters #88)with
keyword around more natural dogespeak possible? #15===
and!==
but no==
or!=
. Since this would be 3.0, here's where we can possibly make the breaking changes to keywords. Though not many people probably will use 2.4.xThe text was updated successfully, but these errors were encountered: