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

Remove and rename some std stuff #6586

Closed
Simn opened this issue Sep 16, 2017 · 33 comments
Closed

Remove and rename some std stuff #6586

Simn opened this issue Sep 16, 2017 · 33 comments
Assignees
Milestone

Comments

@Simn
Copy link
Member

Simn commented Sep 16, 2017

  • remove haxe.web
  • remove haxe.unit
  • rename haxe.xml.Fast (maybe add a better Fast)
Simn added a commit that referenced this issue Sep 18, 2017
@Simn
Copy link
Member Author

Simn commented Sep 18, 2017

Removing haxe.unit is blocked on #6461. That's the only place we use it though.

@Simn Simn self-assigned this Sep 18, 2017
@nadako
Copy link
Member

nadako commented Sep 18, 2017

I'm not sure how I feel about haxe.unit removal. It's clearly inferior to things like utest, but OTOH having a standard way to test stuff would be great...

@Simn
Copy link
Member Author

Simn commented Sep 18, 2017

Easy: "The standard way to test stuff with Haxe is using -lib utest" (or whatever)

@back2dos
Copy link
Member

Can we put List on the list?

@ncannasse
Copy link
Member

ncannasse commented Sep 18, 2017 via email

@waneck
Copy link
Member

waneck commented Sep 18, 2017

The real problem with List is its insane default implementation. I think that we need more data structures in the standard library, not less.

@back2dos
Copy link
Member

The real problem with List is its insane default implementation. I think that we need more data structures in the standard library, not less.

The implementation is only part of the problem. The biggest problem is that it pollutes the top-level. We could move it out to haxe.ds and then I wouldn't mind for it to exist there.

Similarly, we should decide what to do with Lambda. It's weirdly named. It creates lists. Doesn't inline, doesn't work on iterators. Maybe we should just get rid of that one too, given that comprehensions give you a far more efficient alternative for map/filter?

@Simn
Copy link
Member Author

Simn commented Sep 19, 2017

The problem with haxe.xml.Fast is that it is being used by haxe.rtti.XmlParser.

@Simn
Copy link
Member Author

Simn commented Sep 24, 2017

I think I'm done for now. Fast is an abstract now, so I think it can stay where it is.

@Simn Simn closed this as completed Sep 24, 2017
@kevinresol
Copy link
Contributor

kevinresol commented Sep 24, 2017

How about moving List to haxe.ds?

@Simn
Copy link
Member Author

Simn commented Sep 25, 2017

Yes we can do that, too. Anyone wanna send a PR?

@Simn Simn reopened this Sep 25, 2017
@kevinresol
Copy link
Contributor

let me try

@Simn
Copy link
Member Author

Simn commented Sep 26, 2017

List has been moved. \o/

@Simn Simn closed this as completed Sep 26, 2017
@Simn
Copy link
Member Author

Simn commented Sep 30, 2017

Oh yeah, there's another big one: haxe.remoting

This one is particularly annoying because it a) still has hardcoded compiler-support and b) uses implements Dynamic, which we also want to deprecate.

@nadako
Copy link
Member

nadako commented Sep 30, 2017

c) it's used by haxelib

@kevinresol
Copy link
Contributor

kevinresol commented Oct 2, 2017

c) it's used by haxelib

This one isn't a big deal I guess? After it is moved out, haxelib can simply change the reference.

@markknol
Copy link
Member

markknol commented Dec 6, 2017

Can js.jquery.* / js.swfobject.* also be removed from std?

@Simn Simn added this to the Backlog milestone Apr 17, 2018
@Simn
Copy link
Member Author

Simn commented Apr 17, 2018

Can js.jquery.* / js.swfobject.* also be removed from std?

I let @andyli comment on that.

I don't know what do to with haxe.remoting because of haxelib using it. I don't think it's a good idea to make haxelib depend on a haxelib...

@Simn Simn modified the milestones: Backlog, Design Apr 17, 2018
@ibilon
Copy link
Member

ibilon commented Apr 17, 2018

I don't think it's a good idea to make haxelib depend on a haxelib...

Haxelib can use submodule, and probably should instead of doing everything itself, so it's not too much of an issue. And that should not block this.

@Simn
Copy link
Member Author

Simn commented Apr 17, 2018

I'd be fine with that. Let's do it like this:

  1. Add haxe.remoting to hx3compat
  2. Add hx3compat as a submodule to haxelib
  3. Remove haxe.remoting from std
  4. Change haxe.remoting to not require implements Dynamic
  5. Remove implements Dynamic
  6. Investigate if we can get rid of the special compiler support for haxe.remoting

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

Simn commented Jun 5, 2018

I've done 1-4. Currently blocked on 5 due to Java and C# having these HxObject classes that implement Dynamic.

@waneck
Copy link
Member

waneck commented Jun 5, 2018

I can fix that on the weekend

@haxiomic
Copy link
Member

Another move: In js TypedArray classes should not be in js.html since they're part of es2015 rather than just browsers (having them in js.html is misleading when targeting node.js). js.typedarray could be a better place for them

Happy to do this as part of #7354

@Simn
Copy link
Member Author

Simn commented Aug 31, 2018

@waneck: Any chance you could look into this anytime soon? It blocks some progress.

@jgranick
Copy link

jgranick commented Sep 5, 2018

rename haxe.xml.Fast

Can we still consider a new name for Fast? Unless I am mistaken, the majority of Haxe developers use imports. As a result, var fast = new Fast (data); (or similar code) is confusing, where new Bytes, new Map and other cases still retain meaning.

Perhaps Haxe could use XML and XMLData to distinguish between simple XML data and the better "fast" access?

@Simn
Copy link
Member Author

Simn commented Sep 5, 2018

That's a more general discussion. For instance, we also haxe haxe.xml.Parser and haxe.xml.Printer which come with the same problem. I feel like this is alright in a world with decent IDE support.

@ncannasse
Copy link
Member

I agree that "Fast" is not very well describing, maybe "Access" is better ? or another proposal ?

@Simn
Copy link
Member Author

Simn commented Sep 6, 2018

I'm fine with renaming Fast, just not for the reasons mentioned. Access sounds good.

@Simn
Copy link
Member Author

Simn commented Sep 6, 2018

P.S.: This is still blocked on the Java/C# HxObject problem @waneck

@jgranick
Copy link

jgranick commented Sep 6, 2018

It's more destructive, but there's also the idea of using Xml for the Fast API, and using Data or some other designation for the simpler one. It seems like Fast is the better user experience.

Map is a front end for different haxe.ds.* implementations, Fast feels like the XML front end to me.

@waneck
Copy link
Member

waneck commented Sep 8, 2018

@Simn Okay it didn't take a weekend, but here it is - https://github.com/waneck/haxe/tree/disable_implements

@Simn
Copy link
Member Author

Simn commented Sep 9, 2018

Wonderful, thank you!

@Simn
Copy link
Member Author

Simn commented Sep 9, 2018

implements Dynamic is kill

Last thing I'm gonna do here is rename haxe.xml.Fast to haxe.xml.Access with a deprecation-typedef.

We're keeping the haxe.remoting compiler support for now because I don't see how we could work around it easily.

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

10 participants