Giter Site home page Giter Site logo

Comments (5)

0f-0b avatar 0f-0b commented on August 16, 2024 1

This change makes imports shorter and less repetitive, but on the other hand it breaks the pattern of every module being named after the symbol it exports, and having two similarly named modules (equal and equals) might cause confusion.

from deno_std.

kt3k avatar kt3k commented on August 16, 2024

How about renaming equal to isEqual to avoid the above (possible) confusion?

from deno_std.

kt3k avatar kt3k commented on August 16, 2024

A question has been raised in #5176

Should we also do the rename of @std/assert/assertion-error -> @std/assert/error?

from deno_std.

kt3k avatar kt3k commented on August 16, 2024

Should we also do the rename of @std/assert/assertion-error -> @std/assert/error?

I personally don't think we should do this rename.

assert/equals and assertEquals have completely the same sound when they are read. So it feels natural to be able to import assertEquals from assert/equals. On the other hand, assert/error and AssertionError are different in sound. So it feels a bit confusing that one can import AssertionError from assert/error.

WDYT?

from deno_std.

iuioiua avatar iuioiua commented on August 16, 2024

It makes sense that @std/assert/error exports an error class, and it doesn't stick out as much as having a @std/assert/assertion-error, compared to the rest of the package. That's as deep as my reasoning goes, but my opinion isn't too strong.

from deno_std.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.