Within 20 years, most dangerous, repetitive or routine labour jobs will be done by robots. Lawyers, accountants and doctors will work side-by-side with digital assistants. Human decision-makers in businesses, governments and even battlefields will be assisted or replaced by algorithms based on artificial intelligence (AI) and machine learning.
These technologies and the social and economic changes they bring will have a profound impact on our laws and legal systems. So what will the legal landscape look like in 2038? Here are my predictions:
First, data protection law will be elevated to a dominant (if not the dominant) position, thanks to the pervasiveness of data in our lives. In fact, this is already happening. With or without our consent, massive amounts of personal data are being collected through devices and fed into machine learning algorithms. Without effective laws and regulations, our privacy may be breached, our identities and financial information may be stolen, and even our political votes manipulated.
Already, over 100 countries have set up data protection agencies. Currently New Zealand's Privacy Commissioner does not have much power, but this may change as our privacy law is being reformed with a proposal that the Commissioner be empowered to take enforcement actions such as a fine. The European General Data Protection Regulation (GDPR) came into effect in May, bringing sweeping changes to how companies collect and use personal data. Its importance cannot be overstated: it will affect every organisation that deals with data.
Any New Zealand company conducting business online will have to ensure GDPR compliance. And people in the EU will be able to demand sites like Facebook and Google hand over or delete their personal data. New tools built on the blockchain technology may also allow people to have greater control over their personal data.
A new area of law, which I call "AI law", will emerge as a distinctive legal field. In 2038, we will live in a world where AI systems are used to make predictions, recommendations or even consequential decisions - already, bots are filtering job applications and advising on risk assessment of prisoners in some US courts - and being accused of amplifying human biases such as racism.
This will give rise to many new and challenging questions, for which the current law - evolved with humans in mind - does not have a clear answer.
What are the decisions that can be made by computers, and what are the decisions that must be made by human decision-makers? When a human makes a decision, to what extent can he or she rely on recommendations made by a computer? What legal rights does someone subject to a decision made by AI have? And if the decision goes wrong, who should be held liable?
Employment law will need serious revamping. Currently, our employment laws divide workers into "employees" and "contractors", each having different rights and responsibilities. In the future, more and more people will participate in the "gig" economy - think Uber and Airbnb. New laws and policies need to be made to offer protections to those workers.
The law of negligence allows consumers to seek legal redress directly from companies who provided faulty products or services.
But this will continue to become more and more ineffective and costly as more goods and services will be based on artificial intelligence and other sophisticated technologies, making it difficult or impossible for the ordinary consumer to prove negligence.
It's likely that we will see more strict liability replacing negligence - manufacturers and service providers will be held liable even in the absence of negligence.
Obviously, these predictions are far from certain. But it is vital that lawyers, governments and academics grapple with these matters today, given the speed of technological change (think about it: the internet is 20,000 times faster today than in 1998, and the pace of change is only accelerating).
As for lawyers, while they will not be replaced by robots in the near future - or probably ever, those who do not understand and apply new technologies are likely to be replaced by those who do.
• Dr Benjamin Liu is a senior lecturer in commercial law at the University of Auckland business school.