TODO construct

Coming from Kotlin, I really love writing to-be completed or implemented part of code with the TODO() function.

Actually I'd push even forward and suggest right away also another hugely helpful advantage that has been suggested on the kotlin slack channels: having the compiler skipping to parse the code between the TODO() and the really next }

There's #warning("Unimplemented") I use in the mean time, or even #error("Unimplemented").

3 Likes

Uh thanks Lantua, I didnt find them earlier..

However I find it worth leaving this open for the second part of my post

Ps: anyway, they appear to act at compile-time, am I right? Because I'd like something at runtime

There's fatalError(_:file:line:) which takes effect at runtime.

2 Likes

And there's some work happening in the community to have finer specification of fatalErrors at runtime

3 Likes

Yep, and I'm actively working on this proposal. I've got two in the pipeline, and this is one of them.

4 Likes