Former SunMicrosystems boss Scott McNealy says he's offered "condolences and congratulations" to Twitter CEO Dick Costolo about the social network's IPO plans.

"There's nothing more constraining than dealing with ... all the just crazy things we do to our public companies," McNealy told CNBC's "Squawk Box" on Tuesday. But he added that going public can also be satisfying.