# If Shakespeare wrote C++

**URL:** <https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580>\
**Category:** Miscellaneous and Personal Stuff I Must Share\
**Created:** [April 28, 2001, 12:36am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580 "2001-04-28T00:36:09Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![cykrider](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@cykrider](https://boards.straightdope.com/u/cykrider)\
**Post date:** [April 30, 2001, 1:20am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/21 "2001-04-30T01:20:40Z")

</div>

int value=100;  
cout\<\<"What is in a name?(0-100): ";  
cin\>\>value;

if (value==0)  
cout\<\<“A rose by any other is still as sweet.”;

---

<div class="post-metadata">

**Author:** ![ITR\_champion](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@ITR\_champion](https://boards.straightdope.com/u/ITR_champion)\
**Post date:** [April 30, 2001, 5:15am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/22 "2001-04-30T05:15:38Z")

</div>

smell(rose, sweet).  
smell(other\_name, sweet).  
as(arg1, arg2) :- smell(arg1, qual), smell(arg2, qual).

%% Trial Run  
as(rose, X).  
X=other\_name;  
No.

* * *

not\_equal(hawk, handsaw).  
know(wind, arg1, arg2) :- wind == north\_by\_northwest, +not\_equal(arg1, arg2).  
know(wind, arg3, arg4) :- wind == north\_by\_northwest, not\_equal(arg3, arg4).  
mad(wind) :- know(wind, hawk, handsaw).

%% Trail runs  
mad(north\_by\_northwest).  
Yes.  
mad(southernly).  
No.

---

<div class="post-metadata">

**Author:** ![Daemon](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Daemon](https://boards.straightdope.com/u/Daemon)\
**Post date:** [April 30, 2001, 7:06am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/23 "2001-04-30T07:06:07Z")

</div>

friend = MarcAntony  
\<not\> friend = Brute

e2 = Brute ?

---

<div class="post-metadata">

**Author:** ![BlackKnight](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@BlackKnight](https://boards.straightdope.com/u/BlackKnight)\
**Post date:** [April 30, 2001, 11:53pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/24 "2001-04-30T23:53:07Z")

</div>

I know the very basics of prolog, since my prof for AI went over it in one lecture. I certainly don’t know it very well though, and from I’ve seen I don’t think I want to. LISP is bad enough. 😉

BTW, thanks for the contribution ITR champion!  
You too Daemon.

Anyone want to try some codetry (code+poetry) on some other poets?

---

<div class="post-metadata">

**Author:** ![dropzone](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dropzone/32/7515_2.png) [@dropzone](https://boards.straightdope.com/u/dropzone)\
**Post date:** [May 1, 2001, 2:18am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/25 "2001-05-01T02:18:56Z")

</div>

> [@](#):
>
> \*Originally posted by BlackKnight \*  
> **LISP is bad enough.**

Ah, LISP, the only language I’m currently being paid to know a little of. If only the guys who created Autocad had chosen a different language…

OTOH, it can be fairly compact (compared with C) and any language that is THAT flexible with its typing is nuts enough to be interesting.

Anybody know of a good editor that can count the Stupid Parentheses for me?

---

<div class="post-metadata">

**Author:** ![ThreeLeggedBob](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@ThreeLeggedBob](https://boards.straightdope.com/u/ThreeLeggedBob)\
**Post date:** [May 1, 2001, 11:49pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/26 "2001-05-01T23:49:50Z")

</div>

if (romeo.loyalty(juliet) \> romeo.loyalty(montague) {  
. . romeo.denyFather();  
. . romeo.refuseName();  
} else {  
. . romeo.swearLove(juliet);  
. . juliet.denyFather();  
. . juliet.refuseName();  
}

---

<div class="post-metadata">

**Author:** ![DRY](https://avatars.discourse-cdn.com/v4/letter/d/a87d85/32.png) [@DRY](https://boards.straightdope.com/u/DRY)\
**Post date:** [May 2, 2001, 12:30am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/27 "2001-05-02T00:30:41Z")

</div>

“I know not whether to depart in silence,  
Or bitterly to speak in your reproof.”  
–Richard III, Act 3, Scene VII

[sub]But since I don’t know shit about C++, I think I’ll choose the former[/sub]

---

<div class="post-metadata">

**Author:** ![Daemon](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@Daemon](https://boards.straightdope.com/u/Daemon)\
**Post date:** [May 2, 2001, 3:39am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/28 "2001-05-02T03:39:59Z")

</div>

dim arose[a@-z@] = wouldsmellassweet

---

<div class="post-metadata">

**Author:** ![dropzone](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dropzone/32/7515_2.png) [@dropzone](https://boards.straightdope.com/u/dropzone)\
**Post date:** [May 2, 2001, 12:26pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/29 "2001-05-02T12:26:38Z")

</div>

> [@](#):
>
> \*Originally posted by BlackKnight \*  
> \*\*Anyone want to try some codetry (code+poetry) on some other poets? \*\*

You mean like:

onward = 1.5 \* league;

?

---

<div class="post-metadata">

**Author:** ![TheNerd](https://avatars.discourse-cdn.com/v4/letter/t/858c86/32.png) [@TheNerd](https://boards.straightdope.com/u/TheNerd)\
**Post date:** [May 2, 2001, 3:10pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/30 "2001-05-02T15:10:43Z")

</div>

```auto

import eliot.ts.*; //java's screwed up package naming convention

public class TheHollowmen implements Poem {
  private Subject we;

  public TheHollowmen(){
    we = new Subject();
  }

  public void verseI(){
    we.setAttributes(we.HOLLOW | we.STUFFED);
    we.LeanTogether();
    we.getHeadpiece().fillWith("Straw");
    we.getVoices().setDried(true);
    we.getVoices().setQuiet(DryGrass.getWind().getQuietValue());
    //get a rat
    Rat rat = new Rat();
    //get the Meaninglessness value
    rat.getFeet().RunOver(Glass.BROKEN, we.Cellar);
    we.getVoices().setMeaningless(rat.getFeet().getMeaninglessValue());
    we.getVoices().whisper();

    Shape shape = new Shape(Shape.FORMLESS);
    Shade shade = new Shade(Shade.COLOURLESS);
    Force force = new Force(Force.PARALYSED);
    Gesture gesture = new Gesture(Gesture.MOTIONLESS);

    Subject those = new Subject();
    those.setEyes(Eyes.DIRECT);
    those.crossTo(DeathsOtherKingdom);
    Memory memory = those.remember(we);
    memory.lostSoul(false);
    memory.violentSoul(false);
    memory.isHollow();
    memory.isStuffed();
  }

  public static Void main(String[] args){
    Poem p = new TheHollowmen();
    p.verseI();
  }

}

```

---

<div class="post-metadata">

**Author:** ![Monstre](https://avatars.discourse-cdn.com/v4/letter/m/e274bd/32.png) [@Monstre](https://boards.straightdope.com/u/Monstre)\
**Post date:** [May 9, 2001, 6:11am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/31 "2001-05-09T06:11:36Z")

</div>

> [@](#):
>
> \*Originally posted by Daemon \*  
> \*\*Let x = 2b \<or\> (\<not\> 2b)  
> Print x
> 
> Hey guys, using boolean logic, and assuming b = 0 or 1, what are the possible solutions for x?\*\*

Just x = 1…

```auto

switch(song)
{
  case NIGHTINGALE:
     romeo.stay();
     romeo.die();
     break;
  case LARK:
     romeo.be(gone);
     romeo.live();
     break;
}

```

---

<div class="post-metadata">

**Author:** ![Punoqllads](https://avatars.discourse-cdn.com/v4/letter/p/d2c977/32.png) [@Punoqllads](https://boards.straightdope.com/u/Punoqllads)\
**Post date:** [May 9, 2001, 10:55am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/32 "2001-05-09T10:55:49Z")

</div>

```auto

long MarcAntony::speech()
{
  (Friends + Romans + Countrymen).lendEars();

  Caesar.bury();
#if 0
  Caesar.praise();
#endif

  // Copied from Men.cpp
  if (Caesar.evil)
    Caesar.evil = new Evil_t(*Caesar.evil);
  if (Caesar.good)
    Caesar.bones.inter(Caesar.good);

  Fault grievous = Noble(Brutus).CheckAmbition(Caesar);
  if (grievous)
    Caesar.Answer(grievous);

  if (Brutus.getLeave() && rest.getLeave()) {
    assert(Brutus.honorable && rest.honorable);
    assert(Caesar.isFriend() && Caesar.isFaithful() && Caesar.isTrue());

    while(Captive current = Caesar.popCaptive())
      Rome.coffers += current.Ransom();

    if (Rome.poor.cry())
      Caesar.weep();

    if(GetEvent() == LUPERCAL)
      // Should we unroll this loop for a speedup? -- Will
      for(int i = 0; i < 3 && !Caesar.isKing(); i++)
        Caesar.Present(Kingly crown);
  }

  Crowd.Castigate();

  while(heart.location == Caesar.coffin)
    Pause();

  return heart;
}

```

---

<div class="post-metadata">

**Author:** ![Sue\_Duhnym](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@Sue\_Duhnym](https://boards.straightdope.com/u/Sue_Duhnym)\
**Post date:** [May 11, 2001, 7:37am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/33 "2001-05-11T07:37:41Z")

</div>

Even though I don’t get any of it (well, except Basic) I just love that people can have fun doing weird crap like this here.

> [@](#):
>
> \*Originally posted by TheNerd \*  
> [http://www.thinkgeek.com](http://www.thinkgeek.com)

Thanks for this link, I ordered myself a **WTF?** babydoll tee. Way cool.

---

<div class="post-metadata">

**Author:** ![Chinju](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Chinju](https://boards.straightdope.com/u/Chinju)\
**Post date:** [May 12, 2003, 11:32pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/34 "2003-05-12T23:32:17Z")

</div>

Here’s a short one:

“true”

Alright, I’ll expand it:

“(2_B) || !(2_B)”  
_ba-dum-ching_

---

<div class="post-metadata">

**Author:** ![Eman\_Bruin](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@Eman\_Bruin](https://boards.straightdope.com/u/Eman_Bruin)\
**Post date:** [May 12, 2003, 11:56pm UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/35 "2003-05-12T23:56:25Z")

</div>

Here’s a Java one…

public boolean Question(boolean be )  
{

if(be)  
return true;  
else return false;

}  
yeah, slow day at work…

---

<div class="post-metadata">

**Author:** ![SolGrundy](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@SolGrundy](https://boards.straightdope.com/u/SolGrundy)\
**Post date:** [May 13, 2003, 1:50am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/36 "2003-05-13T01:50:40Z")

</div>

Bravo, **Punoqllads**!

I can only do a short one now:

Rose aRose;  
Rose& otherName = aRose;  
assert(aRose.smell() == otherName.smell());

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [May 13, 2003, 1:57am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/37 "2003-05-13T01:57:28Z")

</div>

```auto

boolean Hamlet (int Act = 2, int scene = 2) {
  struct being Man = work.WhatAPiece();
  cout << nobility(Man.reason);
  while (true) Man.faculty++;
  if(form && moving) cout << (Man.expressiveness & Man.admirability);
  Man.action = Angel.action;
  Man.apprehension = God.apprehension;
  World.beauty = Man;
  for (int i = 0; i < NUM_ANIMALS; ++i) Man > Animal*;
  Dust.quintessence()->me = what;
  return (Me.delight(Man) == false);
}

```

---

<div class="post-metadata">

**Author:** ![Bill\_H](https://avatars.discourse-cdn.com/v4/letter/b/a5b964/32.png) [@Bill\_H](https://boards.straightdope.com/u/Bill_H)\
**Post date:** [May 13, 2003, 2:42am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/38 "2003-05-13T02:42:51Z")

</div>

What a flashback. I had forgotten this one.

---

<div class="post-metadata">

**Author:** ![BlackKnight](https://avatars.discourse-cdn.com/v4/letter/b/eb8c5e/32.png) [@BlackKnight](https://boards.straightdope.com/u/BlackKnight)\
**Post date:** [May 13, 2003, 2:43am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/39 "2003-05-13T02:43:43Z")

</div>

It’s sorta eerie when one of your threads rises from the dead like this.

Well, while I’m here, how about a little Richard III Java? At the end of 5.6:

```auto

public class MyBosom {
 Heart[] great = new Heart[1000];
}

++ourStandards;
setUpon(ourFoes);

Our.courage.getAncientWord("fair Saint George").inspireUs(fieryDragons.getSpleen());

setUpon(them);

Victory.sitsOn(Our.getHelms());

System.exit();

```

---

<div class="post-metadata">

**Author:** ![MysteryFellow63427](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@MysteryFellow63427](https://boards.straightdope.com/u/MysteryFellow63427)\
**Post date:** [May 13, 2003, 4:11am UTC](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580/40 "2003-05-13T04:11:37Z")

</div>

I’m going to go bleach my eyes now.

[Previous page](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580.md?page=1)

[Next page](https://boards.straightdope.com/t/if-shakespeare-wrote-c/63580.md?page=3)
