October 20, 2021

On Wednesday, 20 October 2021 at 09:32:15 UTC, IGotD- wrote:

>

Why are many using D using printf to begin with and not the D equivalent like writeln?

In the case of the string interpolation DIP, from what I remember it was mostly Walter was very adamant on string interpolation being printf compatible.

In the general case, I assume people using printf are mostly GC-phobic, or are just in general writing @nogc code.

Here's the DIP, including the links to the discussion threads: https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1027.md

I can't be bothered myself to skim through things to pick out examples, but feel free to do so yourself.

October 20, 2021

On Wednesday, 20 October 2021 at 08:09:18 UTC, Kagamin wrote:

>

On Monday, 18 October 2021 at 14:39:35 UTC, russhy wrote:

>

you can't compete with highlevel languages and their sub 1ms incremental GC

ASP.net team is working hard on reducing the impact of the GC in their library!

When GC flies out of the window, it shouldn't matter whether it's sub 1ms incremental or what.

Are we getting rid of the GC? :D

I never read about any of that here, can you please share the source of this amazing info :)

October 20, 2021

On Wednesday, 20 October 2021 at 10:50:26 UTC, Tejas wrote:

>

Are we getting rid of the GC? :D

In the ASP.net team sense.

>

I never read about any of that here, can you please share the source of this amazing info :)

https://dlang.org/phobos/std_container_array.html

October 24, 2021

On Monday, 11 October 2021 at 19:15:51 UTC, bachmeier wrote:

>

On Monday, 11 October 2021 at 15:59:10 UTC, Atila Neves wrote:

>

I'm brainstorming about what I'll talk about at DConf, and during a conversation with Walter I thought it might be cool to talk about:

  • Worst features implemented in a non-toy language

C's pointer notation is too stupid for words. (I understand how it works. I've been using it for decades. Please no explanations.)

Yes, it is cultural debt, that came from a desire to express types such as a 'pointer to a pointer to an int' with a notation for keyboards with a limited set of easily accessible symbols. The cost is quite high, but people are used to. It us equally puzzeling why prople want "&&" instead of "and" or "||" instead of "or". There is no rational explanation, I think people like to feel that they are using something advanced and that a syntax that that is associated with advanced usage makes them feel more skilled? Kinda like fashion...

October 24, 2021

On Sunday, 24 October 2021 at 08:42:54 UTC, Ola Fosheim Grøstad wrote:

>

Yes, it is cultural debt, that came from a desire to express types such as a 'pointer to a pointer to an int' with a notation for keyboards with a limited set of easily accessible symbols. The cost is quite high, but people are used to. It us equally puzzeling why prople want "&&" instead of "and" or "||" instead of "or". There is no rational explanation, I think people like to feel that they are using something advanced and that a syntax that that is associated with advanced usage makes them feel more skilled? Kinda like fashion...

I imagine && and || stem from & and |. You could probably have something like "and" and "band", "or" and "bor" but to me that doesn't seem as comfortable.

October 24, 2021

On Sunday, 24 October 2021 at 09:04:16 UTC, SealabJaster wrote:

>

I imagine && and || stem from & and |. You could probably have something like "and" and "band", "or" and "bor" but to me that doesn't seem as comfortable.

Adding onto that, a "pineapple on pizza" sort of thing is that some people like to write things like a&b|c instead of a & b | c, the former I don't think is possible with keywords, but is with operators.

October 24, 2021

On Sunday, 24 October 2021 at 08:42:54 UTC, Ola Fosheim Grøstad wrote:

>

instead of "or". There is no rational explanation, I think people like to feel that they are using something advanced and that a syntax that that is associated with advanced usage makes them feel more skilled? Kinda like fashion...

Sorry for all the typos (ipad)...

Anyway cultural impact on syntax is intersting. In the 70s/80s screens were quite limited so it made sense to write more terse code. Quite prevalent for systems work, either low level or scripting. Python did a good job of cleaning up syntax in professional programming, which is a factor in its popularity. I think elitism has a lot to do with fashions in language syntax. Like, even when BASIC would be the best tool for a job, I think many would rather not use it as it would imply being a less sophisticated programmer...

October 24, 2021

On Sunday, 24 October 2021 at 09:04:16 UTC, SealabJaster wrote:

>

I imagine && and || stem from & and |. You could probably have something like "and" and "band", "or" and "bor" but to me that doesn't seem as comfortable.

That was why C used it, but it leads to uneccessary problems with typos, too many meanings for the symbols and overall less legible code.

In terms of modelling, "&&" is used for reasoning about control flow and "&" is used for low level trickery. There is no usabilty advantage in mixing those levels visually. Also, the semantics are different as "&&" shortcuts, a point newbies tend to overlook...

October 24, 2021

On Sunday, 24 October 2021 at 08:42:54 UTC, Ola Fosheim Grøstad wrote:

>

It us equally puzzeling why prople want "&&" instead of "and" or "||" instead of "or". There is no rational explanation, I think people like to feel that they are using something advanced and that a syntax that that is associated with advanced usage makes them feel more skilled? Kinda like fashion...

Because boolean algebra was already a thing and it was symbolic in nature. So making it wordy would probably seem a bit odd, maybe childish to some people. It'd be like writing arithmetic expressions like this...

1 plus 1 equals 2

If you can understand why people wouldn't want to write arithmetic expressions like that, surely you can understand why some people wouldn't want wordy boolean expressions?

October 24, 2021

On Sunday, 24 October 2021 at 10:21:22 UTC, claptrap wrote:

>

On Sunday, 24 October 2021 at 08:42:54 UTC, Ola Fosheim Grøstad wrote:

>

It us equally puzzeling why prople want "&&" instead of "and" or "||" instead of "or". There is no rational explanation, I think people like to feel that they are using something advanced and that a syntax that that is associated with advanced usage makes them feel more skilled? Kinda like fashion...

Because boolean algebra was already a thing and it was symbolic in nature. So making it wordy would probably seem a bit odd, maybe childish to some people. It'd be like writing arithmetic expressions like this...

1 plus 1 equals 2

If you can understand why people wouldn't want to write arithmetic expressions like that, surely you can understand why some people wouldn't want wordy boolean expressions?

This might be a good reason actually.

Coming from logic I at first thought that of course "or" would be ∨ and "and" would be ∧ etc, but then, where are those signs on my keyboard 😭

(I actually have an apl keyboard but that's another thing)

So made sense in a way to reuse & and | since they are pretty close as alternative representations, ie ∥ VS || for example.