Robert Louis Stevenson's novel Treasure Island heavily inspired almost every single high-seas or pirate-themed work of fiction that followed it.
Despite the standard interpretations of straight adventure, the central theme to Treasure Island is of a bildungsroman, or "coming-of-age" story. Jim Hawkins, the young protagonist, goes from a simple life working in a tavern to a dangerous life on the ocean, battling against pirates and soldiers. His "adoption" by the old pirate Long John Silver serves to teach him many skills he needs to survive, including keeping his word, an important matter of honor in that era. Silver shows him the advantages of subterfuge and deception:
Long John was hard at work going from group to group, spending himself in good advice, and as for example no man could have shown a better. He fairly outstripped himself in willingness and civility; he was all smiles to every-one. If an order were given, John would be on his crutch in an instant, with the cheeriest “Ay, ay, sir!” in the world; and when there was nothing else to do, he kept up one song after another, as if to conceal the discontent of the rest.
Silver's example allows Jim to deceive dangerous people as the story goes on, saving his own life and those of others. Jim is still seen as a child, and so has access where an adult would not; by the end of the book, he is nearly an adult in mind and temperament and able to commit sabotage and even kill an attacking pirate.
“Now, you see, Jim, so be as you are here,” says he, “I'll give you a piece of my mind. I've always liked you, I have, for a lad of spirit, and the picter of my own self when I was young and handsome. I always wanted you to jine and take your share, and die a gentleman... You can't go back to your own lot, for they won't have you; and, without you start a third ship's company all by yourself, which might be lonely, you'll have to jine with Cap'n Silver.”
(Quotes: Stevenson, Treasure Island, eNotes eText)
Silver shows Jim in action how an old man is able to survive with his wits and a lack of common decency; Jim is not fully taken in by Silver's example, but learns what he needs to survive while still remaining honest. In a sense, his life lessons show that he may keep his decency in life, but cannot count on others to do the same; Jim must be pragmatic in dealing with dishonest men, even if it means dishonesty in himself, as long as he remains true to his inner, honest soul.