There are two very different types of pages in SharePoint: Application Pages and Site Pages.
If you are going to use your page as an Application Page, you can safely use inline code or code behind in your page, as Application pages live on the file system.
If it's going to be a Site page, you can safely write inline code as long as you have it like that in the initial deployment. However if your site page is going to be customized at some point in the future, the inline code will no longer work because customized site pages live in the database and are executed in asp.net's "no compile" mode.
Bottom line is - you can write aspx pages with inline code. The only problem is with customized Site pages... which will no longer care for your inline code.