digitalmars.D - Why are some types from std not in the core of the language?
- mesni (6/6) Jun 09 2022 D has AA and arrays built into the language and runtime. But why
- mesni (5/11) Jun 09 2022 By the way, all modern system languages (zig, odin) have such
- Paul Backus (8/25) Jun 10 2022 Most contributors would rather build something that's ugly and
- zjh (2/6) Jun 10 2022 Is it because there is no `class encapsulation`?
- zjh (3/4) Jun 10 2022 What can be done to improve the willingness of contributors to
- Paul Backus (3/9) Jun 10 2022 No, it's because there's too much shared mutable state, and not
- zjh (4/6) Jun 10 2022 Can it be improved by splitting large `source files` into small
- Paul Backus (2/8) Jun 10 2022 The size of the source files is not the problem.
- max haughton (2/13) Jun 10 2022 Wouldn't hurt though.
- monkyyy (5/11) Jun 09 2022 So everyone can feel extremely clever coding their own with
- IGotD- (8/14) Jun 10 2022 I'm not sure if AA and arrays are built in the D language. Not
- ryuukk_ (17/23) Jun 12 2022 That's one of the reason i'm more and more using Zig these days
- zjh (5/7) Jun 12 2022 You're right, `d'` need depends on the strength of the
- zjh (5/8) Jun 12 2022 D should stop `'D2'`, develop `'D3'` and radically refactor
- zjh (8/10) Jun 12 2022 The reason why there are few contributors is that the code can
- zjh (8/13) Jun 12 2022 We all know the story of `'VIM' and 'Nvim'`. What `'d'` needs is
- zjh (5/12) Jun 12 2022 `C++` was revived through the radical `'c++11'`
- Zoadian (7/17) Jun 12 2022 "class level encapsulation" is absolutely unnecessary. don't put
- forkit (3/6) Jun 12 2022 You heard it first here folks.
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (3/5) Jun 12 2022 People have to agree on what D3 would be like, meaning: write a
D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.
Jun 09 2022
On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.By the way, all modern system languages (zig, odin) have such types built in. And D, due to the need to maintain compatibility (although it still breaks it), moves away from the roots and follows the path of C++
Jun 09 2022
On Friday, 10 June 2022 at 01:16:10 UTC, mesni wrote:On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:To quote [my own post][1] on the subject:D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.By the way, all modern system languages (zig, odin) have such types built in. And D, due to the need to maintain compatibility (although it still breaks it), moves away from the roots and follows the path of C++The dirty secret here is that the code quality of the DMD fronted has deteriorated to the point where it is basically impossible to do a correct, complete implementation of any non-trivial language feature. So we can either have a library solution that works, but has ugly syntax; or we can have a language solution that has nice syntax, but doesn't work.Most contributors would rather build something that's ugly and correct than something that's beautiful and broken, so they mostly choose to write new libraries instead of new language features. [1]: https://forum.dlang.org/post/jccdguayqqziwaxnhxts forum.dlang.org
Jun 10 2022
On Friday, 10 June 2022 at 13:21:09 UTC, Paul Backus wrote:the code quality of the DMDIs it because there is no `class encapsulation`?fronted has deteriorated to the point where it is basically impossible to do a correct, complete implementation of any non-trivial language feature.
Jun 10 2022
On Friday, 10 June 2022 at 14:00:13 UTC, zjh wrote:Is it because there is no `class encapsulation`?What can be done to improve the willingness of contributors to contribute?
Jun 10 2022
On Friday, 10 June 2022 at 14:00:13 UTC, zjh wrote:On Friday, 10 June 2022 at 13:21:09 UTC, Paul Backus wrote:No, it's because there's too much shared mutable state, and not enough immutable objects and pure functions.the code quality of the DMDIs it because there is no `class encapsulation`?fronted has deteriorated to the point where it is basically impossible to do a correct, complete implementation of any non-trivial language feature.
Jun 10 2022
On Friday, 10 June 2022 at 14:14:46 UTC, Paul Backus wrote:No, it's because there's too much shared mutable state, and not enough immutable objects and pure functions.Can it be improved by splitting large `source files` into small files? I think should refactor `'dmd'` aggressively.
Jun 10 2022
On Friday, 10 June 2022 at 14:24:06 UTC, zjh wrote:On Friday, 10 June 2022 at 14:14:46 UTC, Paul Backus wrote:The size of the source files is not the problem.No, it's because there's too much shared mutable state, and not enough immutable objects and pure functions.Can it be improved by splitting large `source files` into small files? I think should refactor `'dmd'` aggressively.
Jun 10 2022
On Friday, 10 June 2022 at 15:24:08 UTC, Paul Backus wrote:On Friday, 10 June 2022 at 14:24:06 UTC, zjh wrote:Wouldn't hurt though.On Friday, 10 June 2022 at 14:14:46 UTC, Paul Backus wrote:The size of the source files is not the problem.No, it's because there's too much shared mutable state, and not enough immutable objects and pure functions.Can it be improved by splitting large `source files` into small files? I think should refactor `'dmd'` aggressively.
Jun 10 2022
On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.So everyone can feel extremely clever coding their own with recursive templates Also generally speaking the apis people pick for these things are awful, I rather have more meta programming tools
Jun 09 2022
On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.I'm not sure if AA and arrays are built in the D language. Not even classes are built into the language. If I'm not mistaken AA, arrays and classes are implemented using meta programming and compiler hooks. It's a matter of definition, yes classes, AA, arrays are part of the core language but they aren't really implemented as a core of the language.
Jun 10 2022
On Friday, 10 June 2022 at 01:08:02 UTC, mesni wrote:D has AA and arrays built into the language and runtime. But why are sumtype, arrays/smart pointers using custom allocators, nullable, tuple at the expense of std? Everything listed in this article https://dlang.org/articles/builtin.html applies to them. I think this can be done as something like an optional extension in the compiler.That's one of the reason i'm more and more using Zig these days I don't have to import some random bullshit to have tagged union with pattern matching They'll also have a language server built into the compiler as well as binary patching (meanwhile nobody merge PRs in DCD, and it ends up being a rotten software that is CRUCIAL to D adoption) D is a superior language, BY FAR, but these little things are what makes the difference when you just want to appreciate a language without people telling you to import std.sumtype to have tagged union Two different mindset, at the end, i pick what's make me the less annoyed in the long run, and that's zig's tagged union Really we need to wake up and make D better Our competitive features are becoming the norm, and we are failing behind in many other crucial areas
Jun 12 2022
On Sunday, 12 June 2022 at 13:40:16 UTC, ryuukk_ wrote:Our competitive features are becoming the norm, and we are failing behind in many other crucial areasYou're right, `d'` need depends on the strength of the organization. `DMD` needs radical refactoring. `The source code` is too bad. `Divide` large files into `small files` and do `class encapsulation`!
Jun 12 2022
On Sunday, 12 June 2022 at 14:29:41 UTC, zjh wrote:`DMD` needs radical refactoring. `The source code` is too bad. `Divide` large files into `small files` and do `class encapsulation`!D should stop `'D2'`, develop `'D3'` and radically refactor `'DMD'` for `'D3'`. What should we do if even `experts` can not 'correctly and completely' realize new features?
Jun 12 2022
On Sunday, 12 June 2022 at 14:34:23 UTC, zjh wrote:What should we do if even `experts` can not 'correctly and completely' realize new features?The reason why there are few contributors is that the code can not realize `class level encapsulation`! Without `encapsulation`, the code is a `mess`. A bunch of `thousands of` lines of `code files`, how to contribute? Why not split it into `dozens of` small files into hundreds lines files?
Jun 12 2022
On Sunday, 12 June 2022 at 14:46:29 UTC, zjh wrote:Without `encapsulation`, the code is a `mess`. A bunch of `thousands of` lines of `code files`, how to contribute? Why not split it into `dozens of` small files into hundreds lines files?We all know the story of `'VIM' and 'Nvim'`. What `'d'` needs is `'radical'` change, and `'DMD'` needs to be completely `reconstructed`! At this time, it `makes sense` to completely `refactor` . Keep `'D2'` for maintenance version `only`! Only through `'thorough'` reconstruction can activat people's interest in participating in `'DMD'`!
Jun 12 2022
On Sunday, 12 June 2022 at 15:05:55 UTC, zjh wrote:We all know the story of `'VIM' and 'Nvim'`. What `'d'` needs is `'radical'` change, and `'DMD'` needs to be completely `reconstructed`! At this time, it `makes sense` to completely `refactor` . Keep `'D2'` for maintenance version `only`! Only through `'thorough'` reconstruction can activat people's interest in participating in `'DMD'`!`C++` was revived through the radical `'c++11'` Python has been revived through the radical `'PY3'` `D` also needs `'D3'` to revive! The earlier the radical refactoring `dmd`, the better.
Jun 12 2022
On Sunday, 12 June 2022 at 14:46:29 UTC, zjh wrote:On Sunday, 12 June 2022 at 14:34:23 UTC, zjh wrote:"class level encapsulation" is absolutely unnecessary. don't put your class into module scope if you don't want it's internals exposed to the module in the first place. Also it's not the problem with dmd's code base. dmd lacks documentation, and has mutablility all over the place. Splitting files into smaller modules wouldn't hurt thoughWhat should we do if even `experts` can not 'correctly and completely' realize new features?The reason why there are few contributors is that the code can not realize `class level encapsulation`! Without `encapsulation`, the code is a `mess`. A bunch of `thousands of` lines of `code files`, how to contribute? Why not split it into `dozens of` small files into hundreds lines files?
Jun 12 2022
On Sunday, 12 June 2022 at 15:34:53 UTC, Zoadian wrote:... "class level encapsulation" is absolutely unnecessary. ...You heard it first here folks. This should become the D motto.
Jun 12 2022
On Sunday, 12 June 2022 at 14:34:23 UTC, zjh wrote:D should stop `'D2'`, develop `'D3'` and radically refactor `'DMD'` for `'D3'`.People have to agree on what D3 would be like, meaning: write a spec that they agree on.
Jun 12 2022
On Sunday, 12 June 2022 at 17:29:27 UTC, Ola Fosheim Grøstad wrote:On Sunday, 12 June 2022 at 14:34:23 UTC, zjh wrote:No. D3 will be a fork... too many people stuck in their ways at the moment :-(D should stop `'D2'`, develop `'D3'` and radically refactor `'DMD'` for `'D3'`.People have to agree on what D3 would be like, meaning: write a spec that they agree on.
Jun 12 2022
On Sunday, 12 June 2022 at 17:29:27 UTC, Ola Fosheim Grøstad wrote:People have to agree on what D3 would be like, meaning: write a spec that they agree on.If everyone agrees, do it Everyone disagrees each other. then provided a switch. `DMD` source code even `experts` can't stand it, so it must be radical `refactored`!
Jun 12 2022