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

Why putting "fantasy-land/" before everything in readme? #335

Open
babak-karimi-asl opened this issue Oct 9, 2023 · 3 comments
Open

Why putting "fantasy-land/" before everything in readme? #335

babak-karimi-asl opened this issue Oct 9, 2023 · 3 comments

Comments

@babak-karimi-asl
Copy link

for example instead of writing :

a['fantasy-land/equals'](a) === true

why not just:

a.equals( a ) === true , or just simply a equals a .

or this:
a['fantasy-land/concat'](b)['fantasy-land/concat'](c) is equivalent to a['fantasy-land/concat'](b['fantasy-land/concat'](c)) (associativity)

to this:
a.concat(b).concat(c) === a.concat(b.concat(c)) (associativity)

these concepts are confusing enough by themselves, specially for beginners , so no need to add more complications.

@CrossEye
Copy link

CrossEye commented Oct 9, 2023

You can see the discussion in #92.

A short example: if we don't specify a prefix like that, then a geospatial library with a geographic map method cannot be made Fantasyland compatible, because Fantasyland claims the ownership of the map method. But with the prefix, there's no conflict. It does make these docs hard to read, though, and I'd love to see a good fix for that.

@babak-karimi-asl
Copy link
Author

@CrossEye thanks for responding.

this is fantasy-land's readme , so it belongs to fantasy-land.

it can be declared at the top of the readme : all of the below methods are in "fantasy-land" namespace.

@Avaq
Copy link
Contributor

Avaq commented Nov 30, 2023

@babak-karimi-asl I think it's because of what Fantasy Land tries to be. Fantasy Land is: "A specification for interoperability of common algebraic structures", not "a specification of common algebraic structures". Therefore, with the focus on interoperability, the exact JavaScript structures take the front stage and legibility of the laws (which are defined in many other places) comes second.

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

3 participants