On 31/05/2015 4:46 p.m., lobo wrote:
On Sunday, 31 May 2015 at 02:14:53 UTC, Rikki Cattermole wrote:


You're missing a large part of what I'm saying.

I understand what you're saying, I just disagree ;)

I'd argue well tested and maintained dependencies are more important
than what language they are written in.

For people just learning the language and getting started, saying go
download x for your platform won't be enough. Look at how we are
handling curl right now.
No, for any e.g. library or window creation libraries and likes. Must
have an agreed interface that is not specific to e.g. SDL.
SDL may implement them. But out of the box experience must not rely on
3rd party.

s/bindings/wrapper/

Sorry, I should be more specific, but as I said in my earlier post; slap
a nice D interface over the top of the C library. In D this is trivial.


E.g. such an image library there wouldn't be a JPEG implementation but
would be a PNG one. Because of the complexity of implementing a JPEG
reader/writer. Which is ridiculously hard compared to PNG which is
actually really simple.

Again, I wonder why would you reimplement what you get from libpng?
Think of all the real world tests, tweaks and optimization you're
throwing away by not using libpng.

As for libcurl, well if a pure D curl impl is written for Phobos it will
be 100s to 1000s of additional LOC that require testing and maintaining.
The effort of that alone would be greater than what is currently
required from Phobos devs and end-users with a 'C' dependency.

If dub supported compiling C that would be awesome for my own
bindings/wrappers.

bye,
lobo

I think you are thinking of it a little too much as being mutually exclusive. It's not.

There is no reason not to use e.g. libpng for an image implementation.
But the important thing atleast for phobos is to have an out of the box will work for most people implementation.

Dub would be the amazing way to distribute more image format implementations. So it would be opt-in for e.g. libpng.

I'm atleast trying to hit a middle ground to make everyone happy.
A nice interchangeable image interface, some common image implementations ready to go and of course the ability to add better implementations on the fly.

It's a lot better then the alternatives. Where by you must know the type to use the format or you must have c libraries to make it of any use at all.

Reply via email to