digitalmars.D - Default function parameters of other function parameters
- Your name (24/24) Oct 30 2018 I think it would be nice if default function parameters could be
- Adam D. Ruppe (12/15) Oct 30 2018 You can't do that, but you can do
- Your name (3/4) Oct 30 2018 Are these forums open source? I think i'll add it myself.
- Seb (2/6) Oct 30 2018 https://github.com/CyberShadow/DFeed
- bachmeier (4/8) Oct 31 2018 Just so you know, this isn't a traditional forum, it's a web
- Bastiaan Veelo (5/10) Oct 31 2018 Why wouldn’t it be accepted? It’s just markup. People read back
- bachmeier (6/17) Nov 01 2018 I'm not saying I'm opposed, just that my impression from previous
- Bastiaan Veelo (5/24) Nov 01 2018 I thought I had seen a post from Vladimir where he considered
- Steven Schveighoffer (10/28) Nov 01 2018 I don't see any reason why it wouldn't be accepted. I couldn't care less...
- welkam (3/4) Nov 01 2018 Or you can use https://run.dlang.io/ or https://godbolt.org/
I think it would be nice if default function parameters could be defined as other parameters to the function, like this: ========CODE======== class Rectangle { int width; int height; this(int initialWidth, int initialHeight = initialWidth) { width = initialWidth; height = initialHeight; } } void main() { import std.stdio; auto myRectangle = new Rectangle(5, 17); auto mySquare = new Rectangle(5);//pass only one parameter to make a square } ========END OF CODE=== Side note: Am I missing something, or is there no code snippets on these forums? `backticks` don't do anything. Being a forum about a programming language, there should really be a way to embed snippets of code 😆!
Oct 30 2018
On Tuesday, 30 October 2018 at 21:54:11 UTC, Your name wrote:I think it would be nice if default function parameters could be defined as other parameters to the function, like this:You can't do that, but you can do this(int initialWidth, int initialHeight) { width = initialWidth; height = initialHeight; } this(int initialWidth) { this(initialWidth, initialWidth); } and it isn't a huge amount of code to add and forward and quite flexible in various options.there should really be a way to embed snippets of code 😆!You just type it up lol we can all read it.
Oct 30 2018
On Wednesday, 31 October 2018 at 01:51:38 UTC, Adam D. Ruppe wrote:You just type it up lol we can all read it.Are these forums open source? I think i'll add it myself.
Oct 30 2018
On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:On Wednesday, 31 October 2018 at 01:51:38 UTC, Adam D. Ruppe wrote:https://github.com/CyberShadow/DFeedYou just type it up lol we can all read it.Are these forums open source? I think i'll add it myself.
Oct 30 2018
On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:On Wednesday, 31 October 2018 at 01:51:38 UTC, Adam D. Ruppe wrote:Just so you know, this isn't a traditional forum, it's a web interface to the mailing list. Therefore I don't think it will be accepted.You just type it up lol we can all read it.Are these forums open source? I think i'll add it myself.
Oct 31 2018
On Wednesday, 31 October 2018 at 13:09:05 UTC, bachmeier wrote:On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:Why wouldn’t it be accepted? It’s just markup. People read back ticks in their code all the time, so it’s no problem to read it in mail. The forum can decide to format it however it likes, maybe even make code snippets runnable.Are these forums open source? I think i'll add it myself.Just so you know, this isn't a traditional forum, it's a web interface to the mailing list. Therefore I don't think it will be accepted.
Oct 31 2018
On Thursday, 1 November 2018 at 06:55:02 UTC, Bastiaan Veelo wrote:On Wednesday, 31 October 2018 at 13:09:05 UTC, bachmeier wrote:I'm not saying I'm opposed, just that my impression from previous discussions is that there is a preference to keep things as plain text, and I don't want someone spending time on something that doesn't go anywhere.On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:Why wouldn’t it be accepted? It’s just markup. People read back ticks in their code all the time, so it’s no problem to read it in mail. The forum can decide to format it however it likes, maybe even make code snippets runnable.Are these forums open source? I think i'll add it myself.Just so you know, this isn't a traditional forum, it's a web interface to the mailing list. Therefore I don't think it will be accepted.
Nov 01 2018
On Thursday, 1 November 2018 at 10:33:14 UTC, bachmeier wrote:On Thursday, 1 November 2018 at 06:55:02 UTC, Bastiaan Veelo wrote:I thought I had seen a post from Vladimir where he considered adding support for markup, but maybe I misremember. There is this older post https://forum.dlang.org/post/invscqkyjhkrxpcqqscn beta.forum.dlang.org talking about issues with this. Maybe solutions can be found for all of these, like user preference or a "raw" button, but it does require thought and possibly convincing.On Wednesday, 31 October 2018 at 13:09:05 UTC, bachmeier wrote:I'm not saying I'm opposed, just that my impression from previous discussions is that there is a preference to keep things as plain text, and I don't want someone spending time on something that doesn't go anywhere.On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:Why wouldn’t it be accepted? It’s just markup. People read back ticks in their code all the time, so it’s no problem to read it in mail. The forum can decide to format it however it likes, maybe even make code snippets runnable.Are these forums open source? I think i'll add it myself.Just so you know, this isn't a traditional forum, it's a web interface to the mailing list. Therefore I don't think it will be accepted.
Nov 01 2018
On 11/1/18 6:33 AM, bachmeier wrote:On Thursday, 1 November 2018 at 06:55:02 UTC, Bastiaan Veelo wrote:I don't see any reason why it wouldn't be accepted. I couldn't care less if people write markdown on the NG, even though I don't use the forum. It's still readable on thunderbird (which does do some markdown, but no code formatting). For the record, vibed forums do have markdown: http://forum.rejectedsoftware.com/groups/rejectedsoftware.vibed/thread/56653/ And they are backed by NNTP (or maybe there's an NNTP interface? I'm not sure actually). -SteveOn Wednesday, 31 October 2018 at 13:09:05 UTC, bachmeier wrote:I'm not saying I'm opposed, just that my impression from previous discussions is that there is a preference to keep things as plain text, and I don't want someone spending time on something that doesn't go anywhere.On Wednesday, 31 October 2018 at 02:25:56 UTC, Your name wrote:Why wouldn’t it be accepted? It’s just markup. People read back ticks in their code all the time, so it’s no problem to read it in mail. The forum can decide to format it however it likes, maybe even make code snippets runnable.Are these forums open source? I think i'll add it myself.Just so you know, this isn't a traditional forum, it's a web interface to the mailing list. Therefore I don't think it will be accepted.
Nov 01 2018
On Thursday, 1 November 2018 at 06:55:02 UTC, Bastiaan Veelo wrote:maybe even make code snippets runnable.Or you can use https://run.dlang.io/ or https://godbolt.org/
Nov 01 2018