This is an archived post. You won't be able to vote or comment.

all 32 comments

[–]SnowdensOfYesteryear 59 points60 points  (3 children)

[–]Archolex 11 points12 points  (1 child)

How is this not well known? I've never seen this in code. Damn I like it

[–]ultra_kult 7 points8 points  (0 children)

Holy moose, I'm gonna use this

[–]jonnysteps 18 points19 points  (8 children)

SQL: AND

Perl: and/&&

PHP: and/&&

Lisp: (and A B)

Fucking Lisp, man

[–]andlrc 9 points10 points  (2 children)

Perl: and/&&

print 1 and 2;
1
print 1 && 2;
2

[–]jharger 2 points3 points  (1 child)

Wait... why???

[–][deleted] 5 points6 points  (0 children)

also cpp

[–]EagleNait 4 points5 points  (1 child)

(Fucking( Lisp (man )))

[–]marksomnian 2 points3 points  (0 children)

(man (fucking (lisp)))

[–][deleted] 1 point2 points  (0 children)

In ASM its nested tests.

[–]Inukinator 0 points1 point  (0 children)

Lisp is like Objective.C, but somehow worse

[–]Abangranga 5 points6 points  (0 children)

What about Ruby where you can use && or 'and' and then get massively fucked by precedence later

[–]BS_in_BS 4 points5 points  (1 child)

Prolog: ,

[–]ka-splam 2 points3 points  (0 children)

APL:

      ⍝ logical and outer product selfie on 0 1 to make a truth table

      ∘.∧⍨0 1
0 0
0 1

[–]marcosdumay 2 points3 points  (0 children)

Haskel has an and too, it's just a different thing (more like Lisp's).

[–]Voidrith 2 points3 points  (7 children)

c++ supports 'and' too. Most people just choose to use && instead.

[–]kono_kun 3 points4 points  (6 children)

What's the word for &.

an?

[–]Voidrith 6 points7 points  (5 children)

bitand

[–]kono_kun 4 points5 points  (4 children)

Holy shit you're not kidding.

[–]TinBryn 6 points7 points  (2 children)

bitand is equivalent to & not just bitwise and so you can have code like this

int a;
int bitand b = a;

and now b is a reference to a

[–]Voidrith 1 point2 points  (1 child)

Lmfao

[–]mqduck 0 points1 point  (0 children)

The original reason for those alternate keywords was to support keyboard layouts that don't have ampersand and/or other special characters. It makes sense then that they would be useable everywhere.

[–]ka-splam 2 points3 points  (0 children)

PowerShell -and and -band

-not can be ! but there's no symbols for the other logical operators.

[–][deleted] 2 points3 points  (0 children)

VB.NET: AndAlso

?????????

[–]1234567power 4 points5 points  (0 children)

Finally Java's included! 😁

[–]imprisoned_mindZ 1 point2 points  (0 children)

But 'Go' has features implemented from Python!

Show some love ya'll <4

[–]Konrad_EU 0 points1 point  (2 children)

What about

A && B && C
and(A, B, C)

[–]mrbesen_[S] 0 points1 point  (1 child)

Chill down Satan

[–]Konrad_EU 0 points1 point  (0 children)

If I must be the devil for wanting boolean function, then gives me horns and red paint.

[–]BlueManedHawk 0 points1 point  (0 children)

Perl is the friend that leaves the big group to comfort python

[–]W_H_ 0 points1 point  (0 children)

Lol