hyogwa — Natural effect system that fits TypeScript
작성자
서재원
학과 또는 소속(회사명)
컴퓨터공학과
이메일
environmentset@khu.ac.kr
조회수
13
평가(좋아요)수
0
댓글수
0
Try hyogwa in hyogwa playground! : https://stackblitz.com/edit/typescript-3mavlr?file=index.ts
For some codes, we may consider only its result. When we read an arithmetic expression or a boolean expression we just evaluate it, remember the result and move to next code. For the other codes, however, we should consider not only its result but also effects it may affect. Calling the console.log function results in not only undefined value but also log in the console and evaluating assignment expression like a = 1 results in not only some value but also changes of the value of variable or the scope. If we regard shape of codes and evaluation result value of codes as extensional information(or in simple word, 'interface') of code, we can think the other information -- like "this code will make a log in the console" or "this code will change the value of variable" -- that rises from the code while evaluation intensional information(or in our well known term, 'side effects'). Those intensional information are matters as much as extensional information are since no single one can be easily ignored and we programmers should mind all of them just like we treat extensional information. Our type system, however, only values extensional information and hardly checks possible problems that may happen because of intensional information. All the burdens of inspecting, remembering, reasoning intensional information of code are passed to programmers. That's why we be always bothered by errors like 'undefined is not an object' and 'unhandled promise rejection'. Effect systems solve this giant problem. They encode intensional information of code as types so that type system can recognize and reason on intensional information. By sharing burdens of treating intensional information (once we solely handled) with type system and its automated type checking algorithm we can achieve better programming experience, and better programming experience leads to many advantages like productivity.
As an effect system, hyogwa solves the problem for you. Moreover, hyogwa has the following advantages too.
- Natural interface: No more suspicious wrapper functions, or cumbersome utilities; Write codes as you write plain typescript code.
- Write once, run everywhere: You can perfectly decouple business logics from platform specific logics.
- Easy effect composition: Composing effects is done simply by making union of them; nothing special required.
- Time-saving minimal interface: You can start writing code right after only learning three functions and one type.
- Advanced development experience: Built-in coding assistant is ready for you; it works without extra configuration.
- Type inference friendly design: TypeScript compiler will infer almost every type for you; hyogwa's design is not only easy for users but also for compilers.
For some codes, we may consider only its result. When we read an arithmetic expression or a boolean expression we just evaluate it, remember the result and move to next code. For the other codes, however, we should consider not only its result but also effects it may affect. Calling the console.log function results in not only undefined value but also log in the console and evaluating assignment expression like a = 1 results in not only some value but also changes of the value of variable or the scope. If we regard shape of codes and evaluation result value of codes as extensional information(or in simple word, 'interface') of code, we can think the other information -- like "this code will make a log in the console" or "this code will change the value of variable" -- that rises from the code while evaluation intensional information(or in our well known term, 'side effects'). Those intensional information are matters as much as extensional information are since no single one can be easily ignored and we programmers should mind all of them just like we treat extensional information. Our type system, however, only values extensional information and hardly checks possible problems that may happen because of intensional information. All the burdens of inspecting, remembering, reasoning intensional information of code are passed to programmers. That's why we be always bothered by errors like 'undefined is not an object' and 'unhandled promise rejection'. Effect systems solve this giant problem. They encode intensional information of code as types so that type system can recognize and reason on intensional information. By sharing burdens of treating intensional information (once we solely handled) with type system and its automated type checking algorithm we can achieve better programming experience, and better programming experience leads to many advantages like productivity.
As an effect system, hyogwa solves the problem for you. Moreover, hyogwa has the following advantages too.
- Natural interface: No more suspicious wrapper functions, or cumbersome utilities; Write codes as you write plain typescript code.
- Write once, run everywhere: You can perfectly decouple business logics from platform specific logics.
- Easy effect composition: Composing effects is done simply by making union of them; nothing special required.
- Time-saving minimal interface: You can start writing code right after only learning three functions and one type.
- Advanced development experience: Built-in coding assistant is ready for you; it works without extra configuration.
- Type inference friendly design: TypeScript compiler will infer almost every type for you; hyogwa's design is not only easy for users but also for compilers.
hyogwa — Natural effect system that fits TypeScript
조회수
13
평가(좋아요)수
0
댓글수
0
게시 : 2023년 11월 14일
서재원
컴퓨터공학과
environmentset@khu.ac.kr
hyogwa — Natural effect system that fits TypeScript
조회수
13
평가(좋아요)수
0
댓글수
0
게시 : 2023-11-14
Member
서재원
Keyword
대수적 효과,함수형 프로그래밍,algebraic effects,extensible effects,computational effects,effect system,functional programming,typescript
- 기타