News for hackers. Stuff that matters.
Re:Cppfront, Herb Sutter's proposal for a new C++ syntax by alcover on Saturday September 17, 2022 @05:15PM (#32881653)
Allow me to hijack a little. I'm working on a new language.

Would you people object to ':' for assign and single '=' for equality ?

  int i:42
  if i=42 print "ok"
Re:Cppfront, Herb Sutter's proposal for a new C++ syntax by mkl on Saturday September 17, 2022 @06:58PM (#32882451)
Maxima does something like this. It's weird to use. I think := for assignment makes more sense if you want = for equality (i.e. like Pascal etc.).
Re:Cppfront, Herb Sutter's proposal for a new C++ syntax by bhawks on Saturday September 17, 2022 @06:45PM (#32882353)
Golang uses : to assign in struct initialization and := for new variable assignments so there is some prior art.

Practically speaking I find : to be challenging to quickly scan out of source visually. In golang this objection is muted slightly because struct initialization usually ends up being clearly indented by the formatter.