digitalmars.D.learn - DMD: Is it possible change compile time errors to runtime errors in
- Marcone (3/3) Mar 05 2020 Is it possible change compile time errors to runtime errors in
- Mathias Lang (4/7) Mar 05 2020 No it's not possible, D is a statically typed language.
- Marcone (2/9) Mar 06 2020 I'm coming from Python
- Steven Schveighoffer (4/14) Mar 06 2020 Perhaps you can share an example of your trouble, and we can explain why...
- =?UTF-8?Q?Ali_=c3=87ehreli?= (10/11) Mar 06 2020 The fact that errors are delayed until run time is a Python deficiency.
- Basile B. (5/8) Mar 06 2020 if you deactivate all the errors emitted during the semantic then
Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?
Mar 05 2020
On Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote:Is it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?No it's not possible, D is a statically typed language. Why would you want errors that can be caught at compile time to happen at runtimes ?
Mar 05 2020
On Friday, 6 March 2020 at 05:31:57 UTC, Mathias Lang wrote:On Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote:I'm coming from PythonIs it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?No it's not possible, D is a statically typed language. Why would you want errors that can be caught at compile time to happen at runtimes ?
Mar 06 2020
On 3/6/20 8:59 AM, Marcone wrote:On Friday, 6 March 2020 at 05:31:57 UTC, Mathias Lang wrote:Perhaps you can share an example of your trouble, and we can explain why it's better to have compiler errors in that case. -SteveOn Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote:I'm coming from PythonIs it possible change compile time errors to runtime errors in Dlang? If yes, how can I make it?No it's not possible, D is a statically typed language. Why would you want errors that can be caught at compile time to happen at runtimes ?
Mar 06 2020
On 3/6/20 5:59 AM, Marcone wrote:> On Friday, 6 March 2020 at 05:31:57 UTC, Mathias Lang wrote:I'm coming from PythonThe fact that errors are delayed until run time is a Python deficiency. We accept that deficiency because we also accept claimed benefits that Python brings. If you want to skip the compilation step, you unfortunately can not, but you can combine compilation and execution steps with 'rdmd', which may make it look like the errors are caught at run time: https://dlang.org/rdmd.html Ali
Mar 06 2020
On Friday, 6 March 2020 at 04:56:28 UTC, Marcone wrote:Is it possible change compile time errors to runtime errors in Dlang?noIf yes, how can I make it?if you deactivate all the errors emitted during the semantic then there are very good chance that the compiler crashes while generating code.
Mar 06 2020