is a common expression used when someone regrets that something has not been/was not done. It is a pairing of the 接続助詞（せつぞくじょし） (conjunction particle) ば
, and the past form of the い-Adjective
(remembering that conjugations of いい
use よ, and not い). This construction is often translated to ‘I wish I did (A)’, or ‘I should have done (A)’.
is used after verbs, so requires the standard ば
conjugation, before adding よかった
There aren't any service stops, are there? I wish I had gone to the bathroom before we got on the highway.
I have to work overtime again today? I should have gone to sleep early last night.
highlights hypothetical situations, ばよかった
literally means that ‘it would have been good if (A)’, where (A) is the thing that the speaker wishes had happened.
This grammar point is in direct contrast to ばいい
, the non-past version, which is used to express ‘it would be good if (A)’.
If you don't want to drive, it would be better if you went by train.