Regarding hex strings
foobar
foo at bar.com
Fri Oct 19 06:07:09 PDT 2012
On Friday, 19 October 2012 at 00:14:18 UTC, Nick Sabalausky wrote:
> On Thu, 18 Oct 2012 12:11:13 +0200
> "foobar" <foo at bar.com> wrote:
>>
>> How often large binary blobs are literally spelled in the
>> source code (as opposed to just being read from a file)?
>
>
> Frequency isn't the issue. The issues are "*Is* it ever
> needed?" and
> "When it is needed, is it useful enough?" The answer to both is
> most
> certainly "yes". (Remember, D is supposed to usable as a systems
> language, it's not merely a high-level-app-only language.)
Any real-world use cases to support this claim? Does C++ have
such a feature?
My limited experience with kernels is that this feature is not
needed. The solution we used for this was to define an extern
symbol and load it with a linker script (the binary data was of
course stored in separate files).
>
> Keep in mind, the question "Does it pull it's own weight?" is
> for
> adding new features, not for going around gutting the language
> just because we can.
Ok, I grant you that but remember that the whole thread started
because the feature _doesn't_ work so lets rephrase - is it worth
the effort to fix this feature?
>
>> In any case, I'm not opposed to such a utility library, in
>> fact I think it's a rather good idea and we already have a
>> precedent with "oct!"
>> I just don't think this belongs as a built-in feature in the
>> language.
>
> I think monarch_dodra's test proves that it definitely needs to
> be
> built-in.
It proves that DMD has bugs that should be fixed, nothing more.
More information about the Digitalmars-d
mailing list