[PL] 문자열 구현 방법 - static, limited dynamic, dynamic length

[PL] 문자열 구현 방법 - static, limited dynamic, dynamic length

728x90

Static Length

언어: COBOL, Java의 String Class

구현: compile-time descriptor

Limited Dynamic Length

언어: C, C++

특징: '\0'으로 끝을 표시함

구현: length를 위한 runtime descriptor가 필요할수도 있다 (C, C++은 해당 없음)

Dymaic Length

언어: Perl, JS

구현: runtime descriptor가 필요하다. allocation/deallocation이 구현 문제중 가장 어려운 문제이다.

728x90

from http://sweetdev.tistory.com/1004 by ccl(A) rewrite - 2021-12-08 15:01:34