Re: [swift-evolution] Code comments that check code validity.

2017-01-17 Thread Haravikk via swift-evolution
I think I'm opposed to this; I believe we have enough options for this already, no need to have code comments as well. Options include: 1. Putting code in conditionals that use final/constant values (i.e- compiled away when value evaluates as false) 2. Unused closures/methods/functions 3.

Re: [swift-evolution] Code comments that check code validity.

2017-01-16 Thread Robert Widmann via swift-evolution
Some thoughts, inline ~Robert Widmann 2017/01/14 18:18、Amir Michail via swift-evolution のメッセージ: > The code in a “code comment" must compile (not just be syntactically correct) > yet must not have any effect on the resulting executable. What is the definition of

Re: [swift-evolution] Code comments that check code validity.

2017-01-15 Thread Pierre Monod-Broca via swift-evolution
Amir's idea is interesting to me. But I like Xiadi's solution with unused closure, and I don't see a reason to put more effort into this. It works well with simple and complex cases, and anyhow, for complex cases, feature switches and/or branches are already suitable, like said before. Pierre

Re: [swift-evolution] Code comments that check code validity.

2017-01-15 Thread Step Christopher via swift-evolution
These (maintaining a clean codebase, using source control, branching) are good practices for solo developers as much as anyone else. > El ene. 15, 2017, a las 2:24 PM, Amir Michail via swift-evolution > escribió: > > >> On Jan 14, 2017, at 8:11 PM, Jay Abbott

Re: [swift-evolution] Code comments that check code validity.

2017-01-15 Thread Amir Michail via swift-evolution
> On Jan 14, 2017, at 8:11 PM, Jay Abbott wrote: > > I think this would be an anti-feature , here are some reasons why: > > • If it is code you wrote as an idea for how something might be > implemented in the future, then it should be manually tweaked/validated >

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Jay Abbott via swift-evolution
I think this would be an anti-feature , here are some reasons why: - If it is code you wrote as an idea for how something might be implemented in the future, then it should be manually tweaked/validated anyway when you put it back in. If things change slightly such that your old

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Amir Michail via swift-evolution
> On Jan 14, 2017, at 6:56 PM, Xiaodi Wu wrote: > > > > On Sat, Jan 14, 2017 at 5:50 PM, Amir Michail > wrote: > >> On Jan 14, 2017, at 6:46 PM, Xiaodi Wu > > wrote: >> >>

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Xiaodi Wu via swift-evolution
On Sat, Jan 14, 2017 at 5:50 PM, Amir Michail wrote: > > On Jan 14, 2017, at 6:46 PM, Xiaodi Wu wrote: > > On Sat, Jan 14, 2017 at 5:35 PM, Amir Michail wrote: > >> >> > On Jan 14, 2017, at 6:28 PM, Xiaodi Wu wrote:

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Amir Michail via swift-evolution
> On Jan 14, 2017, at 6:46 PM, Xiaodi Wu wrote: > > On Sat, Jan 14, 2017 at 5:35 PM, Amir Michail > wrote: > > > On Jan 14, 2017, at 6:28 PM, Xiaodi Wu > > wrote: > > > > This

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Xiaodi Wu via swift-evolution
This has been brought up on this list before. The conclusion of the previous thread on this topic was that there is a way to do this: #if false // put your code here #endif It does not allow you to comment out fragments of a single statement, but the incremental value of devoting time to

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Xiaodi Wu via swift-evolution
On Sat, Jan 14, 2017 at 5:35 PM, Amir Michail wrote: > > > On Jan 14, 2017, at 6:28 PM, Xiaodi Wu wrote: > > > > This has been brought up on this list before. The conclusion of the > previous thread on this topic was that there is a way to do this: > > > >

Re: [swift-evolution] Code comments that check code validity.

2017-01-14 Thread Amir Michail via swift-evolution
> On Jan 14, 2017, at 6:28 PM, Xiaodi Wu wrote: > > This has been brought up on this list before. The conclusion of the previous > thread on this topic was that there is a way to do this: > > #if false > // put your code here > #endif > This would not check the code for

[swift-evolution] Code comments that check code validity.

2017-01-14 Thread Amir Michail via swift-evolution
The code in a “code comment" must compile (not just be syntactically correct) yet must not have any effect on the resulting executable. For example, commented entries in an array would be checked for compilability but would not be included in the executable. Such “code comments" would allow