When in doubt - try it. It does depend on what your function is trying to do though (see WNDS pragma directives - they still apply buy PL/SQL pretty much determines these automatically).
CREATE OR REPLACE FUNCTION f1
RETURN NUMBER
IS
BEGIN
RETURN 999;
END;
/
Function created
CREATE OR REPLACE FUNCTION f11
RETURN NUMBER
IS
BEGIN
insert into t1 values (1, 2, 3);
RETURN 999;
END;
/
Function created
create or replace view v1 as
select 1 Num, 'hello world' msg, f1 func1
from dual;
View created
create or replace view v11 as
select 1 Num, 'hello world' msg, f11 func1
from dual;
View created
select * from v1;
NUM MSG FUNC1
--------------------------------------- ----------- ---------------------------------------
1 hello world 999
1 row selected
select * from v11;
ORA-14551: cannot perform a DML operation inside a query
ORA-06512: at "SCOTT.F11", line 5
ORA-06512: at line 1