3 ms·
Mmmm, I have a similar background (the C was long ago, the PHP not so long) but love the scoping rules and functional nature. I think that the C background (de
by elyobo 8y ago
Mmmm, I have a similar background (the C was long ago, the PHP not so long) but love the scoping rules and functional nature. I think that the C background (declaring variables up the top of a function) helped avoid some of the JS pitfalls, and I find the block scoping in JS to be convenient at times, whereas PHP's leaks things in ways that can bite you sometimes (e.g. a for loop in PHP would leak both the iterator variables and variables defined within it, while they wouldn't in JS).
The functional stuff was weird for a while but just keeps growing on me.