-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add jsxmlhttprequest #16875
Add jsxmlhttprequest #16875
Conversation
I think Fusion is the better place for these modules. The current plan is that we don't bundle Fusion anymore with Nim, but move atomic refcounting and tree tables into |
@Araq I need Will Pattern Matching be removed?, thats very sad, most programming languages are adding Pattern Matching :( |
Pattern matching stays in Fusion until we have "let as expressions" and can do it properly. |
@Araq What about |
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 think a good place for these modules is a separate Nimble package. You can easily make a jshttpclient
package that includes all of this and allows code that builds on nim c
and nim js
via:
when defined(js):
import jshttpclient
else:
import httpclient
This doesn't need to start out its life in the stdlib.
This was requested to be on stdlib on the PR of #12531 🤷 Whats the problem with the JS modules ?, |
The problem is exactly this, the load on us to review your changes and the effort on you to be blocked by us. If you put them into a Nimble package then you can move fast. I'll put this question back to you, what's wrong with putting this in as a Nimble package first? |
Already done that, several times, people do not use a lot of dependencies for something just works on other languages.
BigInt was the same, most languages are adding bigint, or int128 at least. Decimal the same, at the point it is now requested to be added. Theres more, but you get the idea... is the same thing of "how to add stuff to stdlib" again. Fusion was proposed by core devs, under the idea that it will be shipped along with stdlib, but failed too. In the past people created folders, like I already proposed a "layered stdlib" so this "layer" is NOT supported by core devs ever, @dom96
Fusion already crash-landed and we are still here... |
I don't understand the objection with things that just work. This has happened too many times now, a PR is created, reviewed, fixed, and then closed by saying to create an external package, some other times it actually gets merged. So, now everybody is confused about the status of js backend, nodejs, and how stdlib is actually supposed to be progressing ahead. I think the core team needs to decide and clarify this for everybody's benefit. |
@juancarlospaco maybe reopen this PR, we just need to address all reasonable concerns before moving forward; sometimes it takes a bit of time but doesn't mean it can't be eventually merged. eg, replying to #16875 (review)
the problem with this reasoning is this doesn't help a bit with existing or third party code that calls For very similar reasons, a refs #15826 (comment)
|
@juancarlospaco Your "/contrib/" idea is much like the Fusion idea. Fusion is not dead, it's just that we need to decide what Fusion is about and whether to bundle it with Nim or not. |
The chances that something works on node.js when it never was tested this way are close to zero. These code silos remain to be much better than burdening the Nim users who care about the native target with node.js. Likewise if a module was written for node.js it's annoying having to support "nim c" just because somebody might need it. That's effectively what-if development, costly for everybody. YAGNI is a much better principle. This is not an argument against portability in general, it's just that node.js it's a very special platform, not comparable to Windows vs Posix development. |
Ok, lets imagine this is true and these JS modules are the worst can of worms for a Nim dev,
And these links should give you an empty list:
🤷 |
You're right, they are not and I don't mind reviewing stdlib additions. However, I prefer the layered approach that you yourself argued for. It's just that I think two layers are enough. The "standard library" should consist of a solid core (providing containers, basic IO etc), ideally documented much like C++'s ideas of a standard library that is part of the specification and implementable by independent vendors and then there should be addons and the kitchen sink, but this belongs to Fusion. Much like C++'s boost libraries that eventually end up in the C++ standard. Or not, not everything has to be "standard". |
@Araq |
@juancarlospaco Ok, yes, let's do it this way. |
@juancarlospaco So can we please get these new |
I wrote this designed to be used along with stdlib,
now that Fusion wont ship anymore, lets move it to stdlib,
may be needed for the httpclient for js anyway.
Already tested, reviewed and approved on Fusion.
Changed all mentions of "Fusion" to "Nim" but code is untouched.