You may have to sign up for a free Apple Developer Account in order to download Xcode 10 from the developer link that BDAqua provided — unless Apple has relaxed its access privileges for these tools.
Jul 10, 2017 Xcode is the development and debug environment on the Mac, and provides the required development files for Mac OS X and iOS applications. Register (free.
Alternatively, If all you want is a a compilation environment for Objective-C, C++, and Swift v4.n, the Command Line Tools (macOS 10.13) for Xcode will provide that at 7GB less storage. You would then need a competent programmer's editor, and you can still build hand-coded cocoa applications. This is my preference.