Conversation started Jul 22, 2021 at 18:46.
Jul 22, 2021 18:46
CMQ: What are the most cursed things for a programming language to have/do?
Very strange type casting that happens automatically
@AaronMiller The loop thing with JS and Python
Arrays that can have negative or fractional indices
@AaronMiller Allowing XML literals
That's a good one
Having string replacement based macros
Jul 22, 2021 18:47
@user What loop thing would that be?
Not having TCO is another
@AaronMiller Allowing a completely different syntax depending on some little setting
Switch statements
@AaronMiller The thing where you do for a[3] in a: a and go crazy
@RedwolfPrograms Switch statements can be useful, but proper pattern matching is waayyy better
Switch statements with their C/JS syntax, I mean
Labeled for loops is a good one
Jul 22, 2021 18:49
@AaronMiller Turning \uxxxx into the corresponding Unicode character anywhere, even in comments (looking at you, Java, you sneaky little ********)
Ah, so many ideas!
@user It's fine in strings
caird was working on a language called Hatred, go look at it
Java does it in the code itself too
"\uxxxx" and "\u{xxxx}" are both good
Jul 22, 2021 18:50
@RedwolfPrograms Definitely, but it's cursed when you do it anywhere
@hyper-neutrino Oh...oh no
That's not good
@hyper-neutrino That's exactly why it's cursed
Using UTF-16 and having all of the loops and string methods treat UTF-16 characters individually so higher unicode stuff breaks is another
I once made a program to crash my CS teacher's computer when run by hiding that stuff in the comments, then crashed my own computer, then realized it wouldn't crash anyone else's computer :(
Jul 22, 2021 18:51
brilliant
@AaronMiller Letting you change the encoding halfway
@AaronMiller Having all variables be global
Having defining an undeclared variable make it global
@hyper-neutrino That is so cursed and I love it :)
Having a global variable that contains all global variables as properties
Jul 22, 2021 18:52
@AaronMiller Not being able to declare variables like Python, so you never know if you're setting a global/nonlocal variable or making a new one
Oh I hate that one
Yeah that's a good idea
oh yeah that's cursed
@AaronMiller Functions being able to access the variables of where they were called from instead of where they were defined (dynamic scope instead of the sane lexical scope most languages use)
the fact that accessing a variable works except if later in the function body you assign, then it becomes local scoped and you get a reference error
Having everything have a constructor and various properties except null where trying to access a property errors
Having both null and undefined
Jul 22, 2021 18:53
Not being able to differentiate between a property being null and a property not being defined
Having two function syntices but one of them is subtly different from the other
Alternatively, having N/A, None, null, undefined, NaN, Empty, and other
@RedwolfPrograms I'm happy you're using syntices :)
NaN should be different from the rest
Okay yeah
Having floats as the only number type is a good one though
And if you do add other number types, make +x error for them
Jul 22, 2021 18:55
Aaron are you collecting ideas for a new language...
Having strict typing for numbers (integers, whole numbers, float64s, float32s, fixed point numbers, booleans) but being unable to tell which type a number is, errorring on certain operations on numbers of different types but doing type coercion sometimes
Having dictionaries and objects be the same, and having properties on dictionaries by default
Not having lambdas, array literals, or object literals
@hyper-neutrino Maybe…
Jul 22, 2021 18:56
Having classes just be functions called with new
Quick, burn this conversation before Aaron makes it!
I was just thinking about how cursed Keg is and realized that it could be a lot worse.
Ah, well luckily all of these ideas are more oriented at practical languages
 
Conversation ended Jul 22, 2021 at 18:57.