On Tuesday, 30 November 2021 at 14:46:59 UTC, Ola Fosheim Grøstad wrote:
What about the shortage of manpower?
How to arrange manpower?
November 30, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Tuesday, 30 November 2021 at 14:46:59 UTC, Ola Fosheim Grøstad wrote: What about the shortage of manpower? |
November 30, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to zjh | On Tuesday, 30 November 2021 at 14:58:02 UTC, zjh wrote: >On Tuesday, 30 November 2021 at 14:46:59 UTC, Ola Fosheim Grøstad wrote: What about the shortage of manpower? There are several people writing compilers for either D or D-like languages already… With a clean code base, that is more contemporary, with a more modular architecture, more people would be interested in working on the compiler. |
November 30, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Tuesday, 30 November 2021 at 14:46:59 UTC, Ola Fosheim Grøstad wrote: >There should absolutely be an upgrade path Such as with -preview/-revert then? >For files ending in ".d" emulate most of the current behaviour. For files ending in ".d3" provide the full cleanup. Can you give an example of breaking changes that this .d3 trick allows, that cannot be covered by -preview/-revert? |
December 01, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Piolat | On Tuesday, 30 November 2021 at 19:56:01 UTC, Guillaume Piolat wrote: >On Tuesday, 30 November 2021 at 14:46:59 UTC, Ola Fosheim Grøstad wrote: >There should absolutely be an upgrade path Such as with -preview/-revert then? This is possible:
You have to decide case-by-case what is worthwhile. It has to be based on what existing code-authors find difficult. > >For files ending in ".d" emulate most of the current behaviour. For files ending in ".d3" provide the full cleanup. Can you give an example of breaking changes that this .d3 trick allows, that cannot be covered by -preview/-revert? If you create a new modular frontend and follow a clean spec, then you will get many differences all at once. Anything that depends on "does-this-compile-traits" could break even if you try to emulate DMD. The alternative is to reimplement all quirks of the current frontend and that could have a negative complexity impact and a development time impact, basically not making it worthwhile. All changes that are cleaning up language semantics, can potentially break things such as traits. When you move something to a library or change things you will affect those that do "shoehorn tricks" with the language. You should probably only aim for ease of transition for people who write good code. People who rely on trickery are very costly to support. Anyway, «D3» is inevitable if the current compiler is difficult to evolve, maybe it already «exists» in the shape of another language with no affiliation to D. |
December 01, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Sunday, 28 November 2021 at 20:47:28 UTC, Ola Fosheim Grøstad wrote: >If there was a majority in favour of D3, with breaking changes, and a strong focus on meta-programming, then it would make a lot of sense to streamline the language. What would that consist of? I would say:
Which features that are currently in the language could with some adjustments be done as a library feature? Hashtable? Dynamic array? Slices? Shared? Class? Others language features…? (I think all these could be done if meta-programming facilities were strengthened.) What do you think? What you basically are asking for is C with ast macros. -Alex |
December 01, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 12345swordy | On Wednesday, 1 December 2021 at 15:01:10 UTC, 12345swordy wrote: >What you basically are asking for is C with ast macros. Can you emulate D as C with AST macros? |
December 02, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Wednesday, 1 December 2021 at 15:09:28 UTC, Ola Fosheim Grøstad wrote: >On Wednesday, 1 December 2021 at 15:01:10 UTC, 12345swordy wrote: >What you basically are asking for is C with ast macros. Can you emulate D as C with AST macros? https://github.com/eudoxia0/cmacro Why not try it out yourself. |
December 02, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to 12345swordy | On Thursday, 2 December 2021 at 00:58:38 UTC, 12345swordy wrote: >On Wednesday, 1 December 2021 at 15:09:28 UTC, Ola Fosheim Grøstad wrote: >On Wednesday, 1 December 2021 at 15:01:10 UTC, 12345swordy wrote: >What you basically are asking for is C with ast macros. Can you emulate D as C with AST macros? That would be a different language. Templates are related to AST macros, but they are limited to expanding on"!". |
December 02, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Thursday, 2 December 2021 at 09:20:26 UTC, Ola Fosheim Grøstad wrote: >On Thursday, 2 December 2021 at 00:58:38 UTC, 12345swordy wrote: >On Wednesday, 1 December 2021 at 15:09:28 UTC, Ola Fosheim Grøstad wrote: >On Wednesday, 1 December 2021 at 15:01:10 UTC, 12345swordy wrote: >What you basically are asking for is C with ast macros. Can you emulate D as C with AST macros? That would be a different language. Exactly |
December 02, 2021 Re: Which language constructs could be done as a library if we accept some breaking changes? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Thursday, 2 December 2021 at 09:20:26 UTC, Ola Fosheim Grøstad wrote: >On Thursday, 2 December 2021 at 00:58:38 UTC, 12345swordy wrote: >On Wednesday, 1 December 2021 at 15:09:28 UTC, Ola Fosheim Grøstad wrote: >On Wednesday, 1 December 2021 at 15:01:10 UTC, 12345swordy wrote: >What you basically are asking for is C with ast macros. Can you emulate D as C with AST macros? That would be a different language. Templates are related to AST macros, but they are limited to expanding on"!". The syntax used for macro expansion is a trivial detail. Rust has "real" AST macros, and they also use The biggest difference between AST macros and templates is that expanding a template both generates code and binds that code to a symbol in a particular scope. |