3 ms·
You said `&&` is a stupid symbol and `and` is a better one, right? Sorry I think you're wrong because it's a symbol that used in almost all programming languag
by afshinmeh 14y ago
You said `&&` is a stupid symbol and `and` is a better one, right?
Sorry I think you're wrong because it's a symbol that used in almost all programming languages include c, c++, JavaScript and...
- pjmlp 14y agoC and C++ also have 'and' :) Check iso646.h
- afshinmeh 14y agoAnd `PHP` has it, also! But I didn't see any big application/repository that uses `and` instead of `&&`, honestly.
- pjmlp 14y agoSince I prefer the Pascal family of languages I do actually like "and", but I will use whatever is the default in a given language. This VB piece seems like a bit of VB programmer crap I usually hear from VB users that only dabble in programming without any proper developer education.
- afshinmeh 14y agoBTW, I think using `and` just make things more human readable, closer to what Martin Fowler says about "Good programmers".
- anton_gogolev 14y ago`&&` and `and` have utterly different semantics: `and` does not short-circuit. `andalso` does.
- deleted 14y ago[deleted]
- laumars 14y ago> ['&&' is used] in almost all programming languages [including] c, c++, JavaScript and... You mean all C-syntax languages. ;) There's a hell of a lot of Turing complete languages that don't follow C's syntax (Python, Pascal, Lisp, Haskall, Scala, Erlang, Scheme, PL/SQL, JCL, COBOL, Logo, ALGOL, Fortran, Ada...and countless others which I've I've forgotten about or have never even heard of. But sadly it seems many developers aren't even aware of the popular paradigms outside of imperative programming, let alone the numerous other imperative languages that were popular before C's syntax became the de facto standard template.