Skip to content
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

Internal changes for Haxe 4 #4684

Closed
Simn opened this issue Nov 30, 2015 · 5 comments
Closed

Internal changes for Haxe 4 #4684

Simn opened this issue Nov 30, 2015 · 5 comments

Comments

@Simn
Copy link
Member

Simn commented Nov 30, 2015

This is a collection issue for internal changes we want to make for Haxe 4. Some of these might affect macro users. All these should be considered "under discussion".

Add call type parameter mapping to the AST

We have to find a way of keeping the type parameter mapping in the AST. See https://groups.google.com/forum/#!topic/haxedev/M96qHOYCLsI for a small discussion

Change Null<T> to abstract

See #4316.

Add proper is operator

See #2976. We actually already support this with (expr is TypePath) syntax, the question remains if is should be made a keyword.

Keep track of "quoted" status for structure declarations

See #2642. We currently do some really awkward String encoding.

Keep track of how strings are quoted

We currently rely on some state in the lexer to determine if a field is quoted or not. I once wanted to see how much work it would be to encode this properly and the commit was not a small one.

Add position information in more places

This issue came up in my haxeparser port and I've come across it in core Haxe multiple times. There are several parts in the AST that do not dedicated position information. (implemented)

Identify static closures in the AST

Static closures in the AST are currently TField(_, FStatic), which is also the first argument of a static call TCall(TField(_, FStatic),[]). Since the typer knows it's typing a static closure it might as well set the field kind to FStaticClosure.

Unify module information

We currently keep parts of it in typer_module which causes trouble for any operation that wants to type something into the module, such as Context.defineModule. It would be nice if we could retain this information.

Get rid of TParenthesis in silly places

Generators can decide where they want parentheses, the AST shouldn't have them for if/while conditions and the switch subject.

Support unicode lexing properly

Currently our lexer has some problems with unicode. We should check if we can improve that.

@Simn Simn added this to the Long term milestone Nov 30, 2015
@Simn Simn modified the milestones: 4.0, Long term Mar 1, 2016
@RealyUniqueName
Copy link
Member

Can we drop ?arg:Type syntax at some point? From what i see in our team it introduces a lot of confusion for newcomers. It's not clear for them what is the difference between ?arg:Int and arg:Int = 0 until I explain.

?arg:Int is actually arg:Null<Int> = null. But every single dev which comes to haxe thinks that ?arg:Int is equal to arg:Int = 0.

@RealyUniqueName
Copy link
Member

@Simn
Copy link
Member Author

Simn commented Oct 31, 2016

This issue is mostly about internal changes, i.e. stuff that doesn't really make it to the user (except for macro authors).

@RealyUniqueName
Copy link
Member

Can i start an issue for external changes? )

@Simn Simn modified the milestones: Release 4.0, Design Apr 17, 2018
@Simn Simn modified the milestones: Design, Release 4.0 May 8, 2018
@Simn
Copy link
Member Author

Simn commented Sep 5, 2018

I've done most of the things I wanted to do here, and for the rest we already have open issues.

@Simn Simn closed this as completed Sep 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants