ChateauErin,
@ChateauErin@mastodon.social avatar

I know criticizing C is like, yesterday's pastime, and the syntax I'm criticizing is probably from the seventies, but I hate in particular that the pointer-type's syntax is

type *name

no no no. That contains an address. How else do I get things to contain an address? the & operator, not the * operator

am I dumb or is C dumb or both

mcc,
@mcc@mastodon.social avatar

@ChateauErin I have been annoyed about this for decades and C++ sometimes putting an & there but to mean something different only makes it worse. Even once you understand it it's a huge impediment to explaining C to others

c0dec0dec0de,
@c0dec0dec0de@hachyderm.io avatar

@mcc @ChateauErin the number of objectively wrong and immoral things that C and C++ allow is outrageous! Morally-upstanding computer language when?

gregvr,
@gregvr@wandering.shop avatar

@ChateauErin For years, I used the syntax of

type* pVar

And then everyone got mad at me, saying that I really meant “type *pVar”

I understand why they say it, but… my brain prefers the “wrong” way

fernandomorgan,
@fernandomorgan@mastodon.social avatar

@gregvr @ChateauErin type* pVar is the best way!

c0dec0dec0de,
@c0dec0dec0de@hachyderm.io avatar

@fernandomorgan @gregvr @ChateauErin the issue with this is that if you declare multiple variables on the same line (I don’t, don’t @ me on this), only the first one gets the pointer type because C. It’s bonkers. It’s totally a type thing and should be syntactically attached to the type regardless of how you like formatting it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • thenastyranch
  • Youngstown
  • Durango
  • rosin
  • slotface
  • InstantRegret
  • mdbf
  • PowerRangers
  • kavyap
  • tsrsr
  • everett
  • ngwrru68w68
  • Leos
  • hgfsjryuu7
  • cubers
  • GTA5RPClips
  • khanakhh
  • vwfavf
  • ethstaker
  • osvaldo12
  • cisconetworking
  • tester
  • tacticalgear
  • modclub
  • normalnudes
  • anitta
  • All magazines