-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Haxe 4 changes, part 2 #387
Conversation
|
||
\paragraph{Default Static Extension} | ||
|
||
It is also possible to always enable particular static extensions for a given type, by annotating the type with the \expr{@:using(args...)} metadata. The arguments are the full dot paths of static extension classes that will be applied on the type: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This implies that @:using
works for every type, while it seems to basically only work for enums and classes at the moment...
HaxeFoundation/haxe#8022
HaxeFoundation/haxe#7930
HaxeFoundation/haxe#7859
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we'll leave this as-is for now :)
|
||
A string in Haxe code represents a valid sequence of Unicode codepoints. Due to differing internal representations of strings across targets, only the basic multilingual plane (BMP) is supported consistently: every BMP Unicode codepoint corresponds to exactly one string character. | ||
|
||
On some targets, the internal representation is UTF-16, which means that non-BMP Unicode codepoints are represented using surrogate pairs. It is still possible to work with strings on these targets without having to manually decode surrogate pairs by using the \href{https://api.haxe.org/v/development/haxe/iterators/StringIteratorUnicode.html}{Unicode iterators API} provided in the standard library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that we wanted to remove StringIteratorUnicode in favor of Utf8.iterate, but I'm not sure. Have to keep that in mind though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RealyUniqueName: Can you check the null-safety section? |
Continuing #383 for an easier review process.
Syntax
XMLMarkup literalsStdlib
implements Dynamic
onextern
s onlysys.thread
(I mentioned the Unicode iterator, the others are more or less part of other APIs anyway)haxe.iterators
Compiler defines
warn_var_shadowing
update the list of defines(Reorganise compiler defines #389)Compiler features
Target changes
*.Syntax
classes to replaceuntyped __{js,php,...}__
ES6 generation via(already documented)-D js-es=6
Map
,Set
,Date
...js.lib
--php-{prefix,front,lib}
changed to-D php-*=
-D lua-vanilla
eval
target ?@:persistent
(replacingregisterModuleReuseCall
andonMacroContextReused
)External libraries
hx3compat
haxe.remoting
haxe.web.Request
haxe.unit
(not documented in the first place)record-macros
Other changes
--long-argument
now.<platform>.hx
files@:using
display
+ IDE integration,vshaxe
?enum values without arguments as default function argument values(Constants page / Literals page #386 + Enum case without arguments cannot be used in inline final haxe#8187)