본문 바로가기

College Computer Science/Programming Langauages3

[프로그래밍언어론] 과제 3 : 함수형 프로그래밍 (Functional Programming) 문제 이미 제출한 대다수의 학생이 Functional Programming의 원칙(No variables and assignments, No statements, No side-effects, Referential transparency)을 준수하지 않는 답안을 제출하였습니다. Functional Programming을 제대로 구사하려면 식과 값만 사용하여 프로그래밍 해야합니다. 이런 사고에 익숙해져야 다른 언어를 사용하더라도 함수형 프로그래밍의 장점을 살릴 수 있습니다. 앞에서도 언급했지만 이번에 과제로 나간 문제들은fold(reduce, foldr, foldl)를 사용하여 하나의 식으로 풀 수 있는 문제들입니다. 현재까지 단 한명의 학생만이 이런 취지에 매우 근접한 해답을 제출하였습니다. Code t.. 2020. 12. 20.
[프로그래밍언어론] 과제 2 : OOP 특성을 가진 언어로 구현하기 (Go 사용) 문제 Write a corresponding program for the given example below (in C++, Java and Python) using ONE of the other languages that have different OOP traits such as separation of types from their implementations (e.g. Go), multimethods (e.g. Julia), implementation-only inheritance thru mixin (e.g. Scala, Crystal), prototypes and delegation (e.g. Lua, Io), etc. You will be given better score if you can.. 2020. 12. 20.
[프로그래밍언어론] 과제 1 : 이터레이터 생성자 (Iterator Generator) 만들기 문제 Develop a program per each of the examples of the Python iterator generator for “sort”(quicksort) and “flatten” in ANY language of choice with the following constraints: You MUST NOT use any constructs that are similar or equivalent to the iterator generator of Python (such as “yield”). You have only to use ordinary control structures (if, while, ...) and/or procedure calls. You CAN utilize o.. 2020. 12. 20.