October 28, 2021

On Thursday, 28 October 2021 at 07:45:38 UTC, jfondren wrote:

>

https://tryapl.org/

uni: ∨∧
asc: v^

Only that ^ atm is used as xor, not and :-(
(uh, writing such a sentence makes very clear, why using words instead of symbolic operators is such a bad idea)

October 28, 2021

On Thursday, 28 October 2021 at 07:45:38 UTC, jfondren wrote:

>

https://tryapl.org/

uni: ∨∧
asc: v^

I think you would have to write to the authors to find out all the alternatives they gave. I don't know if they provided "^" or not.

October 28, 2021

On Thursday, 28 October 2021 at 08:54:35 UTC, Ola Fosheim Grøstad wrote:

>

On Thursday, 28 October 2021 at 07:45:38 UTC, jfondren wrote:

>

https://tryapl.org/

uni: ∨∧
asc: v^

I think you would have to write to the authors to find out all the alternatives they gave. I don't know if they provided "^" or not.

Ok, so I read the article again and they did and they were ranked low for OR:

The three lowest ranked for non-programmers: "v", "^", "nor"
The three lowest ranked for programmers: "^", "exclusive and", "nor"

I don't know how they were ranked for AND.

October 28, 2021

On Wednesday, 27 October 2021 at 18:35:24 UTC, Ola Fosheim Grøstad wrote:

>

On Wednesday, 27 October 2021 at 17:41:40 UTC, Basile B. wrote:
[...]
But, if you don't allow implicit conversion to/from bool then the compilation stage should catch most such typos in the type system. So the impact of syntax also depends on language semantics.

Yeah, that's a point of agreement.

October 28, 2021

On Thursday, 28 October 2021 at 10:34:28 UTC, Basile B. wrote:

>

On Wednesday, 27 October 2021 at 18:35:24 UTC, Ola Fosheim Grøstad wrote:

>

On Wednesday, 27 October 2021 at 17:41:40 UTC, Basile B. wrote:
[...]
But, if you don't allow implicit conversion to/from bool then the compilation stage should catch most such typos in the type system. So the impact of syntax also depends on language semantics.

Yeah, that's a point of agreement.

BTW "to bool", as you saiy, is not an implicit conv... it's more a special case that only happens when a condition is evaluated so if condition, while condition, CondExp condition, AssertExp, and I think that's all.

That detail is important to understand why pascal and works perfectly with both numbers and booleans ;)

October 28, 2021

On Thursday, 28 October 2021 at 10:41:23 UTC, Basile B. wrote:

>

On Thursday, 28 October 2021 at 10:34:28 UTC, Basile B. wrote:

>

On Wednesday, 27 October 2021 at 18:35:24 UTC, Ola Fosheim Grøstad wrote:

>

On Wednesday, 27 October 2021 at 17:41:40 UTC, Basile B. wrote:
[...]
But, if you don't allow implicit conversion to/from bool then the compilation stage should catch most such typos in the type system. So the impact of syntax also depends on language semantics.

Yeah, that's a point of agreement.

BTW "to bool", as you saiy, is not an implicit conv... it's more a special case that only happens when a condition is evaluated so if condition, while condition, CondExp condition, AssertExp, and I think that's all.

That detail is important to understand why pascal and works perfectly with both numbers and booleans ;)

it's because it does not do that. If it does, then and is directly broken.

October 28, 2021

On Thursday, 28 October 2021 at 07:45:38 UTC, jfondren wrote:

>

On Thursday, 28 October 2021 at 07:17:00 UTC, Ola Fosheim Grøstad wrote:

>

On Thursday, 28 October 2021 at 07:05:47 UTC, Dom DiSc wrote:

>

I would strongly prefer ∨ for or, ∧ for and (and ⊻ for exclusive or btw) and I think ~ for cat is a good choice (and far better than +), but I would prefer ∘.

"v" was available, but I don't think they got unicode alternatives.

https://tryapl.org/

uni: ∨∧
asc: v^

In case anyone is unfamiliar with it, Notation As A Tool Of Thought (Iverson)

https://www.jsoftware.com/papers/tot.htm

October 30, 2021

On Thursday, 14 October 2021 at 16:48:12 UTC, Atila Neves wrote:

>

On Monday, 11 October 2021 at 21:41:45 UTC, monkyyy wrote:

> >
  • Worst features implemented in a non-toy language
  • Embedding js in an html document.

  • adding objects to an existing language

>
  • Worst features (in your opinion) in D
  • nontrivial namespace collisions when importing std

  • int promotion

  • verbose enums

  • contracts and all the cute ideas expanding a template header to affect the matching

  • sword of damocles of safe by default or who knows what koolaid being enabled one day

Interesting. What is it about safe by default that would worry you?

verbosity

October 31, 2021

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
  • Worst features (in your opinion) in D
  • Features you'd like to see in D

Ideas? Examples?

Thanks!

It's not a big one, but I find C#'s enumeration type to be almost completely pointless in web development because it will deserialize invalid values.

If you have

public enum Animal
{
 Cat = 1,
 Dog = 2,
 Bird = 3
}
  1. You can still load a database row where the Animal value is, say, 200, and it will not give you any errors
  2. You can still receive a web request for an object with property Animal Pet {get;set;} where the Animal value is 1000 and it will deserialize from JSON and create the object with a non-null Pet property like it did it correctly. When you go to use it, it will not be Cat Dog or Bird. It's so dumb.
    There is no advantage of using an enum over a type except when setting a value manually, which you will not be doing often in comparison to user supplied values.

Also, there might as well be methods on C#'s enum, so it's pretty much a complete failure.

November 01, 2021

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

>
  • Worst features implemented in a non-toy language

Python: Assign operator meaning different things in different context
x = 3
Can mean "create a new variable x with value 3" or "assign the value 3 to variable x". This can hit you both ways, I had bugs because I misspelled a variable and created a new variable instead of assigning a new value to an existing one, and I inadvertently changed the value of an existing variable instead of creating a new one. Because of this, I am also very skeptical of Rust's "variable shadowing" feature.

Python passing by reference unless it doesn't:
i=1; j=i; j+=2
-> i = 1, j=3

li=[1]; lj=li; lj += [2]
-> li = [1,2], lj = [1,2]

>
  • Worst features (in your opinion) in D
  • char[] pretends to be an array but is actually more like a linked list
  • lots of attributes and keywords
>
  • Features you'd like to see in D
  • Cleaning up the attributes
  • Making the language simpler, not more complicated

Concerning the "or" vs "||" discussion, as a non-native English speaker, I learned programming as a teenager with barely any English knowledge, and was attracted to the C/C++ syntax as it depends less on English compared to Pascal's syntax.

An English-agnostic programming language would be nice to help non-native English speakers to get into programming more easily, but how would you replace keywords like "if", "while" or "for"?