version(number) is completely useless
Hipreme
msnmancini at hotmail.com
Fri Jul 22 13:36:37 UTC 2022
On Friday, 22 July 2022 at 10:43:03 UTC, Mike Parker wrote:
> On Friday, 22 July 2022 at 10:36:39 UTC, Hipreme wrote:
>
>> ```d
>> version(SDL.2.5) //Ok
>> version(SDL.2.4) //Ok
>> version(SDL.2.3) //Ok
>> version(SDL.2.2) //Ok
>> version(SDL.2.1) //Ok
>> version(SDL.2.0) //Ok
>> version(SDL.1.9) //Not ok
>> ```
>>
>> It would basically just insert all possible versions when
>> defining with a number like that, I'm not expecting to use
>> those kind of operators with `version`. I
>
> Then what happens when you *don't* want old versions together
> with the new one?
I'm thinking about newer versions with incremental additions.
When I was looking into directx-d bindings, most of newer version
depends on older version unless they change its major. The same
thing could be applied to:
```d
version(SDL.2.5.5)
...
version(SDL.2.5.0) //Ok
version(SDL.2.4) //not ok
```
More information about the Digitalmars-d
mailing list