DEV Community

Discussion on: The Coolest Programming Language Features

 
renegadecoder94 profile image
Jeremy Grifski • Edited

Hahaha in a weird way, I find this syntax amazing. The idea that everything is just a string is really a funny concept, and it would make a great language for obfuscation. Good luck trying to figure out what anything does.

Kind of reminds me of Tcl: "strong internationalization support: everything is a Unicode string"

Thread Thread
 
samuraiseoul profile image
Sophie The Lionhart • Edited

I wish to make the disclaimer that while the above is possible it's not super common anymore. You might find some of that fun in framework or library code instead of using or in addition to reflection. You would also see it in legacy code, especially version 4 and below. I found that syntax really cool when I just starting out at programming as well, now I see it as a really strange and even powerful language feature, but one that should almost never be touched. :P

Php arrays are equally BS though. PHP doesn't have real arrays, as in the sequential memory array concept. Everything is essentially a hash map. This causes some weird indexing things. The official docs explain it much better than I can.

php.net/manual/en/language.types.a...

Also for all it's weirdness, php docs at least are really good for the most part. Also PHP is not as bad as people make it out to be at least version 7.1+ and beyond. Though it still is fucked. :P

Also php tried to do the whole everything is unicode thing I believe in version 6 but abandoned it.