Last week I traveled through San Francisco and Silicon Valley, seeing firsthand the cutting-edge research and development at Facebook, Google and eBay. I talked with developers, engineers, executives, investors and technology enthusiasts.

These conversations have all reinforced my basic view: Internet freedom must be preserved and enhanced, and the dynamic technology sector must be freed as much as possible from the grip of government.

Government by its very nature is inefficient. Washington dullards attempting to micromanage tech geniuses would be bad for virtually everyone.

In recent years, we have seen repeatedly how the online sphere is enabling democracy and human rights activists to organize and act. We have seen the Internet’s capacity to expand and improve commerce, giving millions of entrepreneurs an avenue to open and grow their businesses. We have seen products once inconceivable, even in the wildest dreams of a science fiction fan, become consumer staples that make it easier for us to communicate and share experiences.

Today we can be connected to one another wherever we may be and whatever we are doing. When I was a kid, no one could’ve imagined that the iPhone, iPad or iPod would exist. Well, almost no one. Steve Jobs certainly imagined it.

Other leaders like Sergey Brin, Mark Zuckerberg, Peter Thiel and the countless innovators who populate the San Francisco-Silicon Valley corridor imagined other tools and technologies that are now staples of our day-to-day existence.

More importantly, these innovators continue to innovate.

We are in the midst of a national debate about our immigration system. Some are skeptical about inviting more immigrants into America. I believe we should be welcoming more immigrants, and especially entrepreneurs and innovators. We should work to attract science, technology, engineering and math graduates to come to the U.S. and remain here. We should welcome in particular the best and the brightest.

To create the right environment for innovators to be successful, we also need a tax system that incentivizes American companies to invest here at home. We should not penalize companies operating subsidiaries in overseas markets for our outdated, outmoded and nonsensical tax code.

Instead of vilifying job creators and tech revolutionaries like Apple for doing what every sensible business does — seeking to reduce tax liability within the boundaries of the law — we should be taxing money held offshore by American firms at a 5 percent rate if they bring it home. That could add a trillion dollars to the U.S. economy, help create jobs and be a boon to the technology sector.

We also need to stand up for Internet freedom. In today’s high-tech world, we must ensure that all forms of communication are protected. At home, the erosion of privacy and civil liberties continues, especially where electronic communications are concerned. Authoritarian regimes abroad are always seeking to clamp down on Internet freedom precisely because they fear the free exchange of information. We should always denounce them, never emulate them.

These are just some of the ideas I had the pleasure of discussing during my visit to the Silicon Valley, where the technology industry continues to offer a broader horizon for America and the world. I hope to return in the coming months to continue this conversation.

From the people I’ve met and the ideas I’ve heard, something tells me this conversation has only begun.

Rand Paul is a Republican U.S. senator from Kentucky. He wrote this for this newspaper.