Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

함수 로드맵 #7

Open
RanolP opened this issue Nov 1, 2023 · 0 comments
Open

함수 로드맵 #7

RanolP opened this issue Nov 1, 2023 · 0 comments

Comments

@RanolP
Copy link
Member

RanolP commented Nov 1, 2023

함수 선언

fn max(i32 a, i32 b) i32 {
  return if a > b then a else b
}
fn max*i32 a, i32 b) i32 =
    if a > b then a else b

함수 호출

함수를 호출할 때 모든 값은 복사해서 전달되는 의미론
필요시 레퍼런스를 복사해서 넘기게

max(1, 2)
max(3, 4)

콜스택

당장은 C 콜스택 쓰고 Stackless Python의 아이디어를 받아들여서 자체 콜스택으로 구현 이전

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant