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.