Re: Type helpers instead of UFCS

2015-09-16 Thread Per Nordlöw via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. Is is possible. DCD plans to support it: https://github.com/Hackerpilot/DCD/issues/13 I agree that this is a big issue, though, and is

Re: Type helpers instead of UFCS

2015-09-15 Thread BBasile via Digitalmars-d
On Tuesday, 15 September 2015 at 16:14:39 UTC, John Colvin wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: [...] How is this different to just having a specific type for the first argument? void writeln(Args...)(string s, Args args) { static import std.stdio;

Re: Type helpers instead of UFCS

2015-09-15 Thread John Colvin via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. - noobs, code is unreadable. That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties

Re: Type helpers instead of UFCS

2015-09-15 Thread Tina via Digitalmars-d
On Saturday, 12 September 2015 at 20:50:01 UTC, BBasile wrote: On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems

Re: Type helpers instead of UFCS

2015-09-13 Thread Kagamin via Digitalmars-d
On Saturday, 12 September 2015 at 21:04:47 UTC, BBasile wrote: You've got the idea. IDE plugins can not decently provide completion based on the UFCS possibilities. It's possible, just not implemented yet.

Re: Type helpers instead of UFCS

2015-09-13 Thread Puming via Digitalmars-d
On Sunday, 13 September 2015 at 14:37:36 UTC, Kagamin wrote: On Saturday, 12 September 2015 at 21:04:47 UTC, BBasile wrote: You've got the idea. IDE plugins can not decently provide completion based on the UFCS possibilities. It's possible, just not implemented yet. Mono-d seems to have

Re: Type helpers instead of UFCS

2015-09-13 Thread BBasile via Digitalmars-d
On Sunday, 13 September 2015 at 17:17:18 UTC, bitwise wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. By this do you mean completion will be flooded? If so, then +1. I would

Re: Type helpers instead of UFCS

2015-09-13 Thread bitwise via Digitalmars-d
On Sunday, 13 September 2015 at 17:23:25 UTC, BBasile wrote: On Sunday, 13 September 2015 at 17:17:18 UTC, bitwise wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: [...] By this do you mean completion will be flooded? If so, then +1. I would much prefer something like

Re: Type helpers instead of UFCS

2015-09-13 Thread bitwise via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. By this do you mean completion will be flooded? If so, then +1. I would much prefer something like C# extension methods, but where the

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 20:54:09 UTC, Enamex wrote: On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems

Re: Type helpers instead of UFCS

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex templates. - noobs, code is unreadable. meh

Re: Type helpers instead of UFCS

2015-09-12 Thread Idan Arye via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: --- module myhelper; helper for subject : string Do we really need

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex

Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. - noobs, code is unreadable. That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: --- module

Re: Type helpers instead of UFCS

2015-09-12 Thread Enamex via Digitalmars-d
On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 22:44:41 UTC, Idan Arye wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: ---