October 24, 2021

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

>

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...

This has sent me through a slightly on topic yet mostly off topic train of thought.

Languages like Java, C#, probably C++, JS/TS, etc. are all large enough and mainstream enough that there are programmers who only know those singular languages to a decent degree.

Meanwhile there are the more comparatively fringe languages like D, Nim, I guess Rust, and so on, that likely consist of so-called polyglot programmers - those that are proficient in multiple languages.

It's hard to express my thoughts, but I wonder what affect this has on these fringe languages in general, compared to the more mainstream ones.

October 24, 2021

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

>

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?

I think "not being childish" is a sign of fashion-elitism if it makes code less legible. Many languages that predated C++'s uptake did use more intuitive syntax and had a less noisy appearance.

C++ does provide "and" and "or" as keywords though, but people probably don't want to appear as being "not proficient" so I don't actually see it in published code. I have found that using them makes my own code slightly faster to read, so I have recently started to use them. Makes sense to me that "if", "while", "or", "and" ties to flow control, and "&", "|", "+", "/" ties to calculating expressions. I find it slightly easier to read such code when I skim over it (without digging into the specifics).

The line noise does of course make programs look more impressive to non-coders: "Whoa, that looks complex, you must be very clever".

October 24, 2021

On Sunday, 24 October 2021 at 13:59:42 UTC, SealabJaster wrote:

>

Languages like Java, C#, probably C++, JS/TS, etc. are all large enough and mainstream enough that there are programmers who only know those singular languages to a decent degree.

Yes, and all those really grow out of C++ (except JavaScript that is closer to Self IIRC) both in terms of syntax and semantics. So that is in essence captures what "programming" is to most programmers, I would think.

>

Meanwhile there are the more comparatively fringe languages like D, Nim, I guess Rust, and so on, that likely consist of so-called polyglot programmers - those that are proficient in multiple languages.

It's hard to express my thoughts, but I wonder what affect this has on these fringe languages in general, compared to the more mainstream ones.

That is an interesting perspective. I think D and Nim might have roughly two types of programmers: those that do programming on multiple projects and are polyglot, and those that use the language as a tool in some other process (including hobbyists) and who focus on one language.

Then you have those that would want a niche language that is really good at one task, like a very efficient tool for something specific. On the other hand you have those that want one language that covers everything (but then you have to sacrifice being really good at something specific).

And that is where niche languages are struggling, for a polyglot programmer it is much easier to defend adopting yet-another-language if it is a very narrow specialty tool (e.g. the best option for DSP, 3D or something like that). Yet polyglot programmers might have much stronger opinions on what features the language lacks also (in comparison to other languages).

As a result the process might be a bit self-defeating. The polyglots might push the language to be less attractive for polyglot programmers looking for the best narrow tool for a task. And the non-polyglot programmers don't really have a lot of reason to push back on adding more features that makes the language cover more ground for them (as they haven't seen the consequences in other languages).

I think Rust is a bit different. It plays up to "erudite programmers" by giving a sense of being "theory-based" and "academic", and the syntax is reminiscent of more academic languages. I perceive the "marketing surface" of Rust and Haskell to have some common traits, but Rust is easier to deal with for most programmers in a commercial setting. (I am not saying that Rust is academic in nature, only that it is positioned as being more academic than other languages.)

October 24, 2021

On Sunday, 24 October 2021 at 14:47:48 UTC, Ola Fosheim Grøstad wrote:

>

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

>

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?

I think "not being childish" is a sign of fashion-elitism if it makes code less legible. Many languages that predated C++'s uptake did use more intuitive syntax and had a less noisy appearance.

I dont think it does make code less legible. I mean the whole point of using symbolic expressions is that they make it easier to express things. It's not fashion, and it's not elitism. If you're writing a ton of boolean expressions over and over using a symbol instead of a word to express a concept will make it easier. It may increase the learning curve for people coming to it fresh, but that doesn't mean that is reason for doing it.

>

I have found that using them makes my own code slightly faster to read, so I have recently started to use them.

So you find them slightly faster to read, and anyone who doesn't use them must be showing off?

>

Makes sense to me that "if", "while", "or", "and" ties to flow control, and "&", "|", "+", "/" ties to calculating expressions.

But they are not part of control flow, they are part of expressions.

>

The line noise does of course make programs look more impressive to non-coders: "Whoa, that looks complex, you must be very clever".

Yeah cause programmers go around showing their code to non coders to try and impress them. In fact it's my number one way to chat up women, show em some over complicated code till they fall swooning into my arms.

What are you smoking mate?

October 24, 2021

On Sunday, 24 October 2021 at 20:46:01 UTC, claptrap wrote:

>

If you're writing a ton of boolean expressions over and over using a symbol instead of a word to express a concept will make it easier. It may increase the learning curve for people coming to it fresh, but that doesn't mean that is reason for doing it.

The only reason for doing it is that C used it. If there is any difference in typing speed then it would favour letters over symbols.

>

So you find them slightly faster to read, and anyone who doesn't use them must be showing off?

No, I made rational argument for why there are no advantages to using "&&" and "||" over "and" and "or". It is entirely cultural.

>

But they are not part of control flow, they are part of expressions.

Yes, 99% of them in conditional expressions as selectors in control flow. Why being pedantic?

>

Yeah cause programmers go around showing their code to non coders to try and impress them.

No, you don't get the main point. Culture and identity affects preferences and evolution of language, that is a human trait. It is pretty pervasive and well established. There is no reason to assume that programmers are different from other human beings.

There is no reason to be offended by this. It should be obvious, I think?

October 25, 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...

Like genetic random drift, those boolean operators are mostly because C won over Pascal.
The boolean operators in Pascal and Ada are more readable in my opinion.
So I guess the majority of people in the native just never experienced those other operators.

October 25, 2021

On Sunday, 24 October 2021 at 21:26:25 UTC, Ola Fosheim Grøstad wrote:

>

On Sunday, 24 October 2021 at 20:46:01 UTC, claptrap wrote:

>

If you're writing a ton of boolean expressions over and over using a symbol instead of a word to express a concept will make it easier. It may increase the learning curve for people coming to it fresh, but that doesn't mean that is reason for doing it.

The only reason for doing it is that C used it. If there is any difference in typing speed then it would favour letters over symbols.

I'm saying it probably initially came from boolean algebra in maths. Or maybe even electronics, there was a history of boolean logic being expressed with symbols before programming languages even existed.

So that's the root. So then you have bitwise operations with symbols because math. Then you need to differentiate between bitwise and boolean logic so && and || makes more sense than using keywords. It's consistent with the already existing bitwise ops.

> >

So you find them slightly faster to read, and anyone who doesn't use them must be showing off?

No, I made rational argument for why there are no advantages to using "&&" and "||" over "and" and "or". It is entirely cultural.

See above.

> >

But they are not part of control flow, they are part of expressions.

Yes, 99% of them in conditional expressions as selectors in control flow. Why being pedantic?

if (num % 3)
if (ptr == null)

Are arithmetic and pointers now control flow? And anything you can put in the brackets after an if or while now becomes control flow?

It's not pedantic to call that argument nonsense.

> >

Yeah cause programmers go around showing their code to non coders to try and impress them.

No, you don't get the main point. Culture and identity affects preferences and evolution of language, that is a human trait. It is pretty pervasive and well established. There is no reason to assume that programmers are different from other human beings.

Programming languages and natural languages have vastly different evolution. People are not subtly changing programming language syntax all the time as a means of self expression. It's designed once and then (for obvious reasons) pretty much stuck that way for ever at least within a given language. And then there's a kind of inertia across languages I think because familiar syntax is seen as a benefit for a new language.

I mean how long have && and || been in use? 50 years? That's not evolution and it's not fashion.

When someone designs a new programming language I dont think they are asking themselves how can I design the syntax to make themselves look cool, they are either choosing syntax because it is what they are used to, or for some other technical reason.

That's the issue I have with what you're saying, I dont think language designers are making syntax choices in order to look cool. In order to suggest that i think you have to have a fundamental misunderstanding of what motivates people to design their own programming language.

October 25, 2021

On Monday, 25 October 2021 at 10:55:43 UTC, claptrap wrote:

>

I'm saying it probably initially came from boolean algebra in maths. Or maybe even electronics, there was a history of boolean logic being expressed with symbols before programming languages even existed.

Math, sure. Electronics, doubt; considering Algorithm for the Analytical Engine was designed in 1883.

October 25, 2021

On Monday, 25 October 2021 at 10:01:35 UTC, Guillaume Piolat 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...

Like genetic random drift, those boolean operators are mostly because C won over Pascal.
The boolean operators in Pascal and Ada are more readable in my opinion.
So I guess the majority of people in the native just never experienced those other operators.

Pascal has shr, shl, begin, end, maybe other wordy stuff, where do you draw the line? Or rather where do you write "line"? :)

October 25, 2021

On Monday, 25 October 2021 at 11:38:16 UTC, bauss wrote:

>

On Monday, 25 October 2021 at 10:55:43 UTC, claptrap wrote:

>

I'm saying it probably initially came from boolean algebra in maths. Or maybe even electronics, there was a history of boolean logic being expressed with symbols before programming languages even existed.

Math, sure. Electronics, doubt; considering Algorithm for the Analytical Engine was designed in 1883.

What I'm getting at is that whoever designed B, C or whatever came before that probably had a math and or electronics background, so that's why they chose symbolic expressions for bitwise / boolean ops.

I doubt Babages engine had any influence on modern programming syntax.