August 27, 2018
On Monday, 27 August 2018 at 13:48:42 UTC, 12345swordy wrote:
> On Monday, 27 August 2018 at 09:36:43 UTC, Chris wrote:
>> On Monday, 27 August 2018 at 01:15:49 UTC, Laeeth Isharc wrote:
>>
>>> [...]
>>
>> I think D has reached the point where that'd make perfect sense. Move from the garage to a proper factory :)
>
> Who's going to pay for the factory?
> -Alex

That's for the D Foundation to figure out. There's a reason we have a D Foundation now, isn't there?
August 27, 2018
On Sun, Aug 26, 2018 at 11:12:10PM +0000, FeepingCreature via Digitalmars-d wrote: [...]
> Can I just throw in here that I like autodecoding and I think it's good?  If you want ranges that iterate over bytes, then just use arrays of bytes.  If you want Latin1 text, use Latin1 strings. If you want Unicode, you get Unicode iteration. This seems right and proper to me. Hell I'd love if the language was *more* aggressive about validating casts to strings.

Actually, this is exactly the point that makes autodecoding so bad, because it *looks like* correct Unicode iteration over characters, but it actually isn't.  It's iteration over Unicode *code points*, which is not the same thing as iteration over what people would think of as "characters", which in Unicode is called graphemes (cf. byGrapheme).

So iterating over strings like "a\u301" will give you two codepoints, even though it actually renders as a single grapheme. Unfortunately, most of the time the iteration will look correct -- in most European languages, so the programmer will suspect nothing wrong. Until the code is then given a non-European Unicode string. Then it starts getting wrong behaviour.

Not to mention that this incomplete solution represents an across-the-board performance hit on all string-processing code (unless it was explicitly written to bypass autodecoding with something like byCodeUnit), even if the code in question doesn't even care about Unicode and treats the strings as opaque byte sequences.

The illusion of simplicity and correctness that autodecoding gives is misleading, and makes programmers think their code is OK, when the fact of the matter is that to handle Unicode correctly, you *have* to actually know that Unicode is and how it works.  You simply cannot pretend that it bears any resemblance to the ASCII days of one code unit per character (no, not even with UTF-32) and expect your code to behave correctly with all valid Unicode input strings.

In fact, this very illusion was what made Andrei choose to go with autodecoding in the first place, thinking that it would default to correct behaviour. Unfortunately, the reality didn't match up with that expectation.

The ideal solution would have been to make strings non-iterable by default, and only iterable when the programmer chooses the mode of iteration (explicitly specify byCodeUnit, byCodePoint, or byGrapheme).


T

-- 
What do you call optometrist jokes? Vitreous humor.
August 27, 2018
On Monday, 27 August 2018 at 14:26:08 UTC, Chris wrote:
> On Monday, 27 August 2018 at 13:48:42 UTC, 12345swordy wrote:
>> On Monday, 27 August 2018 at 09:36:43 UTC, Chris wrote:
>>> On Monday, 27 August 2018 at 01:15:49 UTC, Laeeth Isharc wrote:
>>>
>>>> [...]
>>>
>>> I think D has reached the point where that'd make perfect sense. Move from the garage to a proper factory :)
>>
>> Who's going to pay for the factory?
>> -Alex
>
> That's for the D Foundation to figure out. There's a reason we have a D Foundation now, isn't there?

The annual monthly budget is around 4K$.
https://opencollective.com/dlang#
-Alex
August 27, 2018
On Monday, 27 August 2018 at 16:15:37 UTC, 12345swordy wrote:
> On Monday, 27 August 2018 at 14:26:08 UTC, Chris wrote:
>> On Monday, 27 August 2018 at 13:48:42 UTC, 12345swordy wrote:
>>> On Monday, 27 August 2018 at 09:36:43 UTC, Chris wrote:
>>>> On Monday, 27 August 2018 at 01:15:49 UTC, Laeeth Isharc wrote:
>>>>
>>>>> [...]
>>>>
>>>> I think D has reached the point where that'd make perfect sense. Move from the garage to a proper factory :)
>>>
>>> Who's going to pay for the factory?
>>> -Alex
>>
>> That's for the D Foundation to figure out. There's a reason we have a D Foundation now, isn't there?
>
> The annual monthly budget is around 4K$.
> https://opencollective.com/dlang#
> -Alex

"annual monthly?" Look again:

https://wiki.dlang.org/Vision/2018H1#H2_2017_Review
August 27, 2018
On Sun, Aug 26, 2018 at 11:27:57PM -0700, Manu via Digitalmars-d wrote:
> On Sun, 26 Aug 2018 at 21:50, Walter Bright via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
> > Going the other way, though, is even worse - what do you mean, I have to write forward declarations? Why can't I pass a string literal to a template? No user defined attributes? Why doesn't CTFE work? Who can actually get work done in this language?
> 
> And yes... this.
> This is the truth that has ruined my career.
> There was a time when I used to be happy; ignorance is bliss ;)

Me too(tm)!  D has officially ruined my life (and my career).  I can't
stand writing code in any other language anymore.


[...]
> const however... that's another kettle of fish, and I'm slowly becoming sympathetic to the complaining that I've been watching here for years, which I've somehow managed to resist being sucked into for a very long time.

IMNSHO, const is only a "problem" when you have to interoperate with C++ const, where I can see how the disparity would cause endless woe when translating / interoperating across the C++/D boundary.

Const in D makes sense as-is.  Though, granted, its infectiousness means its scope is actually very narrow, and as a result, we ironically can't use it in very many places, and so its touted benefits only rarely apply. :-(  Which also means that it's taking up a lot of language design real estate with not many benefits to show for it.


T

-- 
Perhaps the most widespread illusion is that if we were in power we would behave very differently from those who now hold it---when, in truth, in order to get power we would have to become very much like them. -- Unknown
August 27, 2018
On Monday, 27 August 2018 at 04:56:22 UTC, Walter Bright wrote:
> On 8/26/2018 6:11 PM, Manu wrote:
>> I'm sure I recall experimental patches where those operators were
>> available to try out... was I dreaming? :/
>
> Andrei has worked on this for a long while, and finally came to the conclusion that ref counting won't work without copy constructors. Hence copy constructors are a priority.

I'd like to know how he arrived at that conclusion.
August 27, 2018
On Monday, 27 August 2018 at 16:32:15 UTC, Joakim wrote:
> On Monday, 27 August 2018 at 16:15:37 UTC, 12345swordy wrote:
>> On Monday, 27 August 2018 at 14:26:08 UTC, Chris wrote:
>>> On Monday, 27 August 2018 at 13:48:42 UTC, 12345swordy wrote:
>>>> On Monday, 27 August 2018 at 09:36:43 UTC, Chris wrote:
>>>>> [...]
>>>>
>>>> Who's going to pay for the factory?
>>>> -Alex
>>>
>>> That's for the D Foundation to figure out. There's a reason we have a D Foundation now, isn't there?
>>
>> The annual monthly budget is around 4K$.
>> https://opencollective.com/dlang#
>> -Alex
>
> "annual monthly?" Look again:
>
> https://wiki.dlang.org/Vision/2018H1#H2_2017_Review

I merely using the value that the open collective site have give me. Regardless $1605 far from enough money to hire full time workers, as chris has suggested.

-Alex
August 27, 2018
On Monday, 27 August 2018 at 18:02:21 UTC, 12345swordy wrote:
> On Monday, 27 August 2018 at 16:32:15 UTC, Joakim wrote:
>> On Monday, 27 August 2018 at 16:15:37 UTC, 12345swordy wrote:
>>> On Monday, 27 August 2018 at 14:26:08 UTC, Chris wrote:
>>>> On Monday, 27 August 2018 at 13:48:42 UTC, 12345swordy wrote:
>>>>> On Monday, 27 August 2018 at 09:36:43 UTC, Chris wrote:
>>>>>> [...]
>>>>>
>>>>> Who's going to pay for the factory?
>>>>> -Alex
>>>>
>>>> That's for the D Foundation to figure out. There's a reason we have a D Foundation now, isn't there?
>>>
>>> The annual monthly budget is around 4K$.
>>> https://opencollective.com/dlang#
>>> -Alex
>>
>> "annual monthly?" Look again:
>>
>> https://wiki.dlang.org/Vision/2018H1#H2_2017_Review
>
> I merely using the value that the open collective site have give me. Regardless $1605 far from enough money to hire full time workers, as chris has suggested.
>
> -Alex

Then the D Foundation should work on it. Get companies on board etc. All I hear is "we don't have enough money, we depend on the good will of our community members..." Then leave it. There's no way D can compete with languages that are backed by companies and that have additional benefits like targeting Android, iOS and the Web, e.g. Kotlin. What does D have to offer? Sure, nice features, but what's the point if you cannot use the language anywhere you like and have broken basics like autodecode? Also, some of the nice features (the more useful ones) are adopted by other languages as time goes by. So there will remain no compelling reason to choose D over other languages - if it goes on like this.

August 27, 2018
On Monday, 27 August 2018 at 18:20:04 UTC, Chris wrote:
> Then the D Foundation should work on it.
Easier said then done. You can't go around demanding people to build factories without addressing the issues that comes with building factories, such as the big question of how is it going to be payed to be built.

-Alex
August 27, 2018
On Monday, 27 August 2018 at 19:51:52 UTC, 12345swordy wrote:
> On Monday, 27 August 2018 at 18:20:04 UTC, Chris wrote:
>> Then the D Foundation should work on it.
> Easier said then done. You can't go around demanding people to build factories without addressing the issues that comes with building factories, such as the big question of how is it going to be payed to be built.
>
> -Alex

But it needs to be done, right? I suppose we agree on this one. Now that we have the D Foundation, its efforts should also go into the "business" side of things, not just features.