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

Using not found/more limited in Haxe4 #8890

Closed
nanjizal opened this issue Oct 23, 2019 · 8 comments
Closed

Using not found/more limited in Haxe4 #8890

nanjizal opened this issue Oct 23, 2019 · 8 comments

Comments

@nanjizal
Copy link
Contributor

Using does not seem to work as well in Haxe4, perhaps it's intentional but reporting incase it's relevant.
Specifically this case breaks see try Haxe:
http://try-haxe.mrcdk.com/#De813

class UseTest {
  public static var val = 'Using Test Look';
  public static function look( v: Dynamic ){
      return val;
  }
}
import UseTest;
using UseTest;
class Test {
  static function main() {
  	new Test();
  }
  public function new(){
    trace( look() );
  }
}

This use case was adapted from divtastic3 so has been working fine this way for many years within Haxe with many releases since Using was added to Haxe, please clarify if this change is intentional. Many Thanks.

@Simn Simn closed this as completed Oct 23, 2019
@nanjizal
Copy link
Contributor Author

Sad I used this a lot it's kind of like a feature in Nim.

Is there anyway to get hold of haxe4 with the webgl fix applied for mac ( more recent then v5 ), as I probably should check all my git stuff, most of my code does not break much with haxe changes but think haxe4 is going to break a lot of my stuff :( I set up dune and updated to opam 2 but seemed to not find extc ( or similar ) was not really sure on the workflow. I looked on s3 for builds but did not find any way to get to the automatic generated ones. Anyone got very recent nightly mac build I can download?

@RealyUniqueName
Copy link
Member

Nightly builds are hosted here: https://build.haxe.org/builds/haxe/
Look for builds with "4.0_bugfix" in their names as it's the name of a branch, which will be used for the final Haxe 4 release.

@nanjizal
Copy link
Contributor Author

@ncannasse this is breaking libraries updated by the most professional Haxer's even when the libraries have unit tests - libraries which I thought would be tested against prior to a release, I think this is a regression in usability so I feel I should flag my concern, certainly I will now avoid using completely in my own code, perhaps using should be removed from Haxe?
polygonal/ds#46

@Neverbirth
Copy link

I also find using more limited on Haxe 4 and porting some project to Haxe 4 is proving to be more painful than I expected (not only related to this, of course). For example using Lambda; doesn't work over tink.pure.List's instances now.

I admit, though, that the usage of static extensions over this strikes bizarre to me.

@Simn
Copy link
Member

Simn commented Nov 11, 2019

Ironically, you can blame the author of tink.pure.List for that: #5924

And me of course.

@ncannasse
Copy link
Member

One way would be to still allow using on this but after self fields lookup.

@Simn
Copy link
Member

Simn commented Nov 11, 2019

Let's not do that, we broke this for a reason. It's a fringe feature which nobody even knew about and which could lead to wacky resolution in some cases. There's also no Haxe 3/4 compatibility problem here because it can be completely fixed by using an explicit this, which works in both versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants