Forum > General

how to break out early of a case ?

<< < (34/34)

MarkMLl:

--- Quote from: PascalDragon on December 07, 2021, 01:23:04 pm ---Once we have support for compile time functions (the current term for them is “pure functions”) you can add that yourself ;)

--- End quote ---

:-) OTOH I'd suggest that that specific case might be worth examining whenever anybody complains that his desired initialisation can't be coded... I'm not suggesting that some implementation be added prematurely, only that it might turn out to be a common "pattern".

MarkMLl

PascalDragon:

--- Quote from: MarkMLl on December 07, 2021, 01:53:23 pm ---
--- Quote from: PascalDragon on December 07, 2021, 01:23:04 pm ---Once we have support for compile time functions (the current term for them is “pure functions”) you can add that yourself ;)

--- End quote ---

:-) OTOH I'd suggest that that specific case might be worth examining whenever anybody complains that his desired initialisation can't be coded... I'm not suggesting that some implementation be added prematurely, only that it might turn out to be a common "pattern".

--- End quote ---

No, it's not worth examining, because then the next one will come with the next function and so on. Better focus this into a more general approach.

Also if all you need is the size in bits then you can always use BitSizeOf.

MarkMLl:

--- Quote from: PascalDragon on December 07, 2021, 02:05:45 pm ---No, it's not worth examining, because then the next one will come with the next function and so on. Better focus this into a more general approach.

Also if all you need is the size in bits then you can always use BitSizeOf.

--- End quote ---

I didn't mean examining as in "we'll add a function" but as in "if you did it like this you wouldn't be asking us to add a function" :-)

MarkMLl

Navigation

[0] Message Index

[*] Previous page

Go to full version