▲ | tc4v 4 days ago | |
This dev seems really inexperienced and has weird uninformed takes. The "functional vibe" but it's just using boolean logic, the "reference in a table" bugs that would happen in any language but C, the ignorance of type annotations and so much time spend on problems caused by said ignorance... | ||
▲ | kragen 4 days ago | parent | next [-] | |
He may not be super expert, but he doesn't pretend to be. His experience is still valid even if he doesn't really understand what functional programming is yet. (His example isn't just boolean logic.) Being surprised by aliasing would have happened the same way in many languages, but not everything but C. It can happen in C too! But maybe in Python you would have used an (x, y) tuple and gotten an error from trying to mutate it, and certainly in Haskell or OCaml you wouldn't introduce mutability implicitly. In Tcl there's no way to get that problem in a list of lists, and in languages like Golang or Rust or C# you'd probably use an array of structs which would also be immune to aliasing. You could have the same problem, but it's less likely. I've known experienced programmers who were surprised by aliasing bugs, and even had trouble debugging them, maybe because they spent a lot of time in languages where they were possible but less likely. What do you mean about ignorance of type annotations? | ||
▲ | lolc 4 days ago | parent | prev [-] | |
The example is not just boolean logic! In Lua logical ops, the last evaluated value is returned. The example makes use of that to assign something other than a bool. Not all languages do that. In Java for example, boolean logic always evaluates to a bool. I'm not sure which part of that you missed, but maybe don't go too hard on calling others inexperienced based on your takes. |