An electrooptic device (1) such as a distributed feed back semiconductor
laser or a semiconductor modulator comprises an optical waveguide. A
contact layer (11) is applied to the optical waveguide for conducting
electrical current to the device for driving or modulating it. The
contact layer is connected to the end of an electrically conducting path
(3) and can have a shape, as seen perpendicularly to the surface of the
device, to give an electric resistance between the end of the path and
different areas at the optical waveguide which resistance is higher for
areas located close to the ends of the device than for areas are located
at the central region of the device. The shape can be si-milar to a
trapezium having concave oblique sides and is selected so that the
resulting varying electrical resistance gives a sub-stantially uniform
electrical power or gain inside the optical waveguide, taken in the
longitudinal direction of the waveguide.