Out of curiosity, which one do you use in your dub projects and why do you prefer one over another?
For example, I use json. Simply because when I see sdl
, I think of SDL2
graphics library.
What's your reason?
Thread overview | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
September 22, 2021 DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | 22.09.2021 13:19, Ki Rill пишет:
> Out of curiosity, which one do you use in your dub projects and why do you prefer one over another?
>
> For example, I use json. Simply because when I see `sdl`, I think of `SDL2` graphics library.
>
> What's your reason?
My reason for sdl format using is its conciseness, human readability and possibility of comments.
P.S. I remember that very long negative thread about sdl format by default and how it was funny when the thread starter agreed later that sdl was much convenient that json.
|
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Wednesday, 22 September 2021 at 10:19:18 UTC, Ki Rill wrote: >Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? Json because it's a consistent format across environments outside of D, unlike sdl which is basically only used by D and only by dub really. |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Wednesday, 22 September 2021 at 10:19:18 UTC, Ki Rill wrote: >Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? Reason to prefer JSON:
Reasons to prefer SDL:
dub converts SDL to JSON for ~/.packages/ , and the same code might be used to convert SDL documentation to JSON, so I think the main problem of multiple dub configuration formats (that it's more of a chore to talk about dub configuration) is not that bad. >On Wednesday, 22 September 2021 at 10:45:41 UTC, bauss wrote: With JSON you do not have to remember what an array or a hash looks like, but that doesn't tell you that the You have to look up what dub expects either way, so the consistency fails to help with the most frustrating part of dub configurations, which is writing them in the first place. |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On Wednesday, 22 September 2021 at 10:19:18 UTC, Ki Rill wrote: >Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? SDL. It's much cleaner to me than JSON. And the fact that JSON is standard elsewhere matters not one iota to me. |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ki Rill | On 9/22/21 6:19 AM, Ki Rill wrote: >Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? I actually used to prefer sdl, but lately, I'm using json. sdl is an ok format to write, but I always forget the way to write arrays or objects. With json I always know what I need to use. I prefer a comment-allowing form, especially for config files, where comments can provide instructions on what directives do. Having dub init spit out a bunch of comments that describe how to configure dub, and how to add dependencies, configs, etc, would go a long way to making it not as bad a format. -Steve |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to drug | On Wednesday, 22 September 2021 at 10:29:58 UTC, drug wrote:
> My reason for sdl format using is its conciseness, human readability and possibility of comments.
>
And this is why I use json parser that accept comments :)
|
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker | On Wednesday, 22 September 2021 at 13:22:33 UTC, Mike Parker wrote: >On Wednesday, 22 September 2021 at 10:19:18 UTC, Ki Rill wrote: >Out of curiosity, which one do you use in your dub projects and why do you prefer one over another? For example, I use json. Simply because when I see What's your reason? SDL. It's much cleaner to me than JSON. And the fact that JSON is standard elsewhere matters not one iota to me. What do you think of Rust's |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Wednesday, 22 September 2021 at 14:15:43 UTC, Steven Schveighoffer wrote: >I prefer a comment-allowing form, especially for config files, where comments can provide instructions on what directives do. Having dub init spit out a bunch of comments that describe how to configure dub, and how to add dependencies, configs, etc, would go a long way to making it not as bad a format. -Steve I wish |
September 22, 2021 Re: DUB: json or sdl? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bauss | On Wednesday, 22 September 2021 at 10:45:41 UTC, bauss wrote: >Json because it's a consistent format across environments outside of D, unlike sdl which is basically only used by D and only by dub really. I use it on the job (not a D shop). |