[Python] (Data) Type: Summary
·
Programming
1. Type 이란?Programming에서 사용되는 모든 value 혹은 object 들의 종류 (category) 를 (data) type이라고 부름.수학에서 숫자의 종류(type)를 실수, 정수, 자연수 등으로 나누는 것을 생각하면 쉽다.Programming에서는문자 (str)들도 다루며, 여러 object를 묶어 하나로 처리 (collection) 하기도 하기 때문에 보다 다양한 type을 지원한다. 프로그래밍 언어들을 이들 type에 대한 체크나 지원 방식에 따라 다음으로 분류됨.https://ds31x.tistory.com/563 Typing: dynamic vs. static and strong vs. weak타입 검사는 프로그램의 type safety를 보장하기 위한 장치이며, 언제(컴파일..
[Python] Dynamic Typed Language vs. Static Typed Language
·
Programming
Python은 대표적인 dynamic (typing) langauge 이다. (dynamic language는 대부분 interpreter language 임.) 좀 더 엄밀하게 애기하면,Dynamic Language란 특정 동작이나 사항들이 runtime(실행 시간)에 결정되는 특징을 가진 Programming Language를 가르킴. comile 시점이 아닌 runtime에 해석되고 실행되며, type이나 호출할 method나 접근할 attribute가 runtime에 해석(and 체크)된다는 특징을 가지고 있다. 유연성이 높고 높은 생산성을 가지나, 성능은 static language 보다 떨어지며 코드가 길어질 경우 오류 탐지가 쉽지 않다는 단점을 가짐.Static (Typing) Languag..
[Programming] Primitive Data Type : C, C++, NumPy, Torch
·
Programming
Primitive Data Type이(Unboxed type)란?C, C++, NumPy, PyTorch, TensorFlow 등에서 사용되는numeric data type들은보통 unboxed type 이라고도 불리는 primitive data type들이다.unboxed type에서는할당된 메모리 bit들이 해당 numeric data type의 특정 값을 표현하는데 다 사용되고해당 type이 고유의 meta data나 methods 등을 가지고 있지 않음.C프로그래밍을 배운 이들에게 이는 매우 당연하게 받아들여지는 개념이다.이와 달리 boxed type이란,unboxed type처럼 값을 저장하는 메모리 bit들 외에도,1) 가지고 있는 값에 대한 meta data 및2) 값과 meta data를 ..