Comments (6)
I'm for this. Having a plainer/simpler symbol that achieves the same functionality is a good idea.
from deno_std.
I just wonder how to introduce this without a breaking change. Should we just deprecate the class and introduce the interface after the class removal?
from deno_std.
I'm not sure there is a way to make a non-breaking change either. However, the change seems easy-to-make, from the user's perspective, and is a small dump in design simplicity. Any thoughts, @kt3k?
Before:
...
fileHandler.handle(
new LogRecord({
msg: "AAA",
args: [],
level: LogLevels.ERROR,
loggerName: "default",
}),
);
...
After:
...
fileHandler.handle({
msg: "AAA",
args: [],
level: LogLevels.ERROR,
loggerName: "default",
});
from deno_std.
@kt3k, would you be in favour of doing this in v1?
from deno_std.
I don't understand the motivation. It doesn't seem solving any problem.
the same can be achieved with plain js object
I think this assumption is not strictly correct. The getter-only fields are currently immutable, but if we change it to plain object, they become mutable (readonly
works for TypeScript, but it doesn't work for JavaScript).
from deno_std.
I don't understand the motivation. It doesn't seem solving any problem.
the same can be achieved with plain js object
I think this assumption is not strictly correct. The getter-only fields are currently immutable, but if we change it to plain object, they become mutable (
readonly
works for TypeScript, but it doesn't work for JavaScript).
That is true, but these properties have getters because the values are objects. So in the spirit of that whole class with getters and readonly properties, the object could just as well be frozen.
from deno_std.
Related Issues (20)
- suggestion: add interactive prompts to `@std/cli` HOT 5
- [feature request(collections)] add `invert` HOT 4
- todo: investigate use of `CAN_NOT_DISPLAY` constant
- proposal: Introduce the Brotli Compression Algorithm HOT 5
- assertStrictEquals(-0, +0) should not throw HOT 5
- proposal: stabilize `std/assert` HOT 1
- new package contribution can't pass `Validate PR title` check
- deno-docs references `[email protected]`, which doesn't exist HOT 1
- proposal: stabilize `std/media-types`
- to-do: answer remaining frequently asked questions HOT 1
- bug: flaky `Spinner.color` test
- Is devcontainer settings useful?
- proposal: stabilize `std/internal` HOT 3
- proposal: stabilize `std/uuid`
- [feature request(collections)] option to merge `undefined` in `deepMerge` HOT 4
- Feature request (async): limit() to limit a function concurrency HOT 11
- suggestion: update "Releases" documentation
- tracking: improve doc checker tools HOT 1
- bug: `Spinner constructor accepts interval` test is flaky HOT 2
- suggestion: expand the functionality of `deno doc --lint`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deno_std.